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

org.springframework.context.support.LiveBeansView.generateJson(Set<ConfigurableApplicationContext>) generates invalid JSON when resources already double-quoted [SPR-12252] #16866

Closed
spring-projects-issues opened this issue Sep 25, 2014 · 3 comments
Assignees
Labels
in: core status: backported type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 25, 2014

Aldo Luciano opened SPR-12252 and commented

result.append(""resource": "").append(resource).append("",\n") in org.springframework.context.support.LiveBeansView.generateJson(Set<ConfigurableApplicationContext>) creates invalid JSON if resource already has quotes.

Found this issue while invoking actuator's /beans endpoint:

...
{
"bean": "securityConfig",
"scope": "singleton",
"type": "demo.SecurityConfig$$EnhancerBySpringCGLIB$$79f7591d",
"resource": ""/C:/Users/904311/Documents/workspace-sts-3.6.1.RELEASE/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_AS_6.x1410896169876/deploy/jboss-demo.war/WEB-INF/classes/demo/SecurityConfig.class"",
...

...then com.fasterxml.jackson.core.json.ReaderBasedJsonParser._skipComment() throws an exception.


Affects: 3.2.11, 4.0.7

Backported to: 4.0.8, 3.2.12

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 26, 2014

Juergen Hoeller commented

This will be available in the upcoming 4.1.1 snapshot. Please give it a try...

It'll get backported to 4.0.8 and 3.2.12 tonight.

Juergen

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 26, 2014

Phil Webb commented

I've just pushed a fix to master to protect against an NPE which the Boot tests triggered. You probably want to include 3827e04 in the backports.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 26, 2014

Juergen Hoeller commented

Alright - just in time...

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: backported type: bug
Projects
None yet
Development

No branches or pull requests

2 participants