Skip to content

XmlValidationModeDetector: length of a string is always greater than index of any of its characters [SPR-11477] #16102

@spring-projects-issues

Description

@spring-projects-issues

Rajeev Bahuguna opened SPR-11477 and commented

The method org.springframework.util.xml.XmlValidationModeDetector::hasOpeningTag should have this:
return (openTagIndex > -1 && content.length() > (openTagIndex+1) && Character.isLetter(content.charAt(openTagIndex + 1)));

in place of the current:
return (openTagIndex > -1 && content.length() > openTagIndex && Character.isLetter(content.charAt(openTagIndex + 1)));


Affects: 3.2.8, 4.0.2

Referenced from: commits 1763bfb, 69c54a0

Backported to: 3.2.9

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions