File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
main/resources/META-INF/rewrite
test/kotlin/org/openrewrite/java/migrate/javax Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -26,21 +26,21 @@ recipeList:
2626---
2727type : specs.openrewrite.org/v1beta/recipe
2828name : org.openrewrite.java.migrate.javax.MigrateXMLEventFactoryNewInstanceToNewFactory
29- displayName : Use `javax.xml.stream.XMLEventFactory#newFactory()`
29+ displayName : Use `javax.xml.stream.XMLEventFactory#newFactory(String, ClassLoader )`
3030description : ' `javax.xml.stream.XMLEventFactory#newInstance` has been deprecated in Java 7.'
3131recipeList :
3232 - org.openrewrite.java.ChangeMethodName :
33- methodPattern : javax.xml.stream.XMLEventFactory newInstance()
33+ methodPattern : javax.xml.stream.XMLEventFactory newInstance(String, ClassLoader )
3434 newMethodName : newFactory
3535
3636---
3737type : specs.openrewrite.org/v1beta/recipe
3838name : org.openrewrite.java.migrate.javax.MigrateXMLInputFactoryNewInstanceToNewFactory
39- displayName : Use `javax.xml.stream.XMLInputFactory#newFactory()`
39+ displayName : Use `javax.xml.stream.XMLInputFactory#newFactory(String, ClassLoader )`
4040description : ' `javax.xml.stream.XMLInputFactory#newInstance` has been deprecated Java 7.'
4141recipeList :
4242 - org.openrewrite.java.ChangeMethodName :
43- methodPattern : javax.xml.stream.XMLInputFactory newInstance()
43+ methodPattern : javax.xml.stream.XMLInputFactory newInstance(String, ClassLoader )
4444 newMethodName : newFactory
4545
4646---
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class JavaxXmlStreamAPIsTest : JavaRecipeTest {
3333
3434 public class Test {
3535 public void method() {
36- XMLEventFactory eventFactory = XMLEventFactory.newInstance();
36+ XMLEventFactory eventFactory = XMLEventFactory.newInstance("test", Test.class.getClassLoader() );
3737 }
3838 }
3939 """ ,
@@ -42,7 +42,7 @@ class JavaxXmlStreamAPIsTest : JavaRecipeTest {
4242
4343 public class Test {
4444 public void method() {
45- XMLEventFactory eventFactory = XMLEventFactory.newFactory();
45+ XMLEventFactory eventFactory = XMLEventFactory.newFactory("test", Test.class.getClassLoader() );
4646 }
4747 }
4848 """
@@ -55,7 +55,7 @@ class JavaxXmlStreamAPIsTest : JavaRecipeTest {
5555
5656 public class Test {
5757 public void method() {
58- XMLInputFactory inputFactory = XMLInputFactory.newInstance();
58+ XMLInputFactory inputFactory = XMLInputFactory.newInstance("test", Test.class.getClassLoader() );
5959 }
6060 }
6161 """ ,
@@ -64,7 +64,7 @@ class JavaxXmlStreamAPIsTest : JavaRecipeTest {
6464
6565 public class Test {
6666 public void method() {
67- XMLInputFactory inputFactory = XMLInputFactory.newFactory();
67+ XMLInputFactory inputFactory = XMLInputFactory.newFactory("test", Test.class.getClassLoader() );
6868 }
6969 }
7070 """
@@ -91,5 +91,4 @@ class JavaxXmlStreamAPIsTest : JavaRecipeTest {
9191 }
9292 """
9393 )
94-
9594}
You can’t perform that action at this time.
0 commit comments