Issue discovered on `spring-integration-xml/src/main/java/org/springframework/integration/xml/splitter/XPathMessageSplitter.java` with `XML parser XXE vulnerability` #36
TraitErrors:
- Method must be created from class org.openrewrite.java.tree.J$MethodDeclaration but was class org.openrewrite.java.tree.J$Block
- InstanceInitializer must be created from class org.openrewrite.java.tree.J$Block but was class org.openrewrite.java.tree.J$Lambda
- Field must be declared in a class, interface, or anonymous class
Detail:
org.openrewrite.analysis.trait.util.TraitErrorsException: TraitErrors:
- Method must be created from class org.openrewrite.java.tree.J$MethodDeclaration but was class org.openrewrite.java.tree.J$Block
- InstanceInitializer must be created from class org.openrewrite.java.tree.J$Block but was class org.openrewrite.java.tree.J$Lambda
- Field must be declared in a class, interface, or anonymous class
org.openrewrite.analysis.trait.util.TraitErrors.doThrow(TraitErrors.java:43)
fj.data.Either$RightProjection.on(Either.java:531)
fj.data.Validation.on(Validation.java:146)
org.openrewrite.analysis.trait.expr.VarAccessBase$1.visitVariable(VarAccess.java:187)
org.openrewrite.analysis.trait.expr.VarAccessBase$1.visitVariable(VarAccess.java:175)
org.openrewrite.java.tree.J$VariableDeclarations$NamedVariable.acceptJava(J.java:5627)
org.openrewrite.java.tree.J.accept(J.java:59)
org.openrewrite.TreeVisitor.visit(TreeVisitor.java:278)
...
Problem
Error:
Message:
Detail:
Expected behavior
Example diff
From:
spring-integration-xml/src/main/java/org/springframework/integration/xml/splitter/XPathMessageSplitter.java
Recipes in example diff:
org.openrewrite.java.security.XmlParserXXEVulnerability
References:
org.openrewrite.java.security.XmlParserXXEVulnerability
XML parser XXE vulnerability
spring-projects/spring-integration/main