Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlaceholderConfigurerSupport.doProcessProperties() loses stack trace on exception [SPR-11346] #15970

Closed
spring-projects-issues opened this issue Jan 22, 2014 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Jim Yingst opened SPR-11346 and commented

In org.springframework.beans.factory.config.PlaceholderConfigurerSupport, the doProcessProperties() method contains the following code:

try {
         visitor.visitBeanDefinition(bd);
}
catch (Exception ex) {
         throw new BeanDefinitionStoreException(bd.getResourceDescription(), curName, ex.getMessage());
}

This effectively loses all stack trace information for the original exception, ex. Other than the getMessage(), which may or may not be useful. It would be easy to change this to properly set the nested cause so as to preserve this information:

throw new BeanDefinitionStoreException(bd.getResourceDescription(), curName, ex.getMessage(), ex);

Affects: 3.2.6

Referenced from: commits 8d304ef, fdd31c0

Backported to: 3.2.7

@spring-projects-issues spring-projects-issues added type: bug A general bug status: backported An issue that has been backported to maintenance branches in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0.1 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants