It solves the problem that XmlValidationModeDetector cannot determine whether XML is based on XSD due to improper parsing of comments spanning multiple lines in the original XML configuration file.

Fixes #27915

Comment From: pivotal-cla

@shooye Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@shooye Thank you for signing the Contributor License Agreement!

Comment From: sbrannen

Hi @shooye,

We really appreciate all the effort you put in to provide a fix!

In the end, we decided to go with a simpler solution that relies on recursion in order to reuse the existing comment parsing logic. If you're interested in checking it out, you'll find it in https://github.com/spring-projects/spring-framework/commit/4b1b25496bfd72c288c3af07c741183d0d90567a#diff-d2b71d5dbef74357add917ba7662a8f3d376fe9e965f82cd08407587b55bf833.

In light of that, I am closing this PR.

Thanks again for reporting this set of bugs.