org.springframework.context.support.LiveBeansView.generateJson(Set<ConfigurableApplicationContext>) generates invalid JSON when resources already double-quoted [SPR-12252] #16866
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
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
The text was updated successfully, but these errors were encountered: