From 1b71a9b9c547f35d59d8b2f884504e5daf3f6377 Mon Sep 17 00:00:00 2001 From: Eduardo Martins Date: Wed, 6 Dec 2023 13:02:18 +0000 Subject: [PATCH] [WINDUPRULE-1019] adds eap 8 ruleset deprecated-initialcontextfactory-is-removed --- ...nitialcontextfactory-is-removed.windup.xml | 34 +++++++++++++++++++ ...recatedInitialcontextfactoryIsRemoved.java | 10 ++++++ ...ated-initialcontextfactory-is-removed.wsdl | 8 +++++ ...lcontextfactory-is-removed.windup.test.xml | 24 +++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 rules/rules-reviewed/eap8/eap7/deprecated-initialcontextfactory-is-removed.windup.xml create mode 100644 rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/DeprecatedInitialcontextfactoryIsRemoved.java create mode 100644 rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/deprecated-initialcontextfactory-is-removed.wsdl create mode 100644 rules/rules-reviewed/eap8/eap7/tests/deprecated-initialcontextfactory-is-removed.windup.test.xml diff --git a/rules/rules-reviewed/eap8/eap7/deprecated-initialcontextfactory-is-removed.windup.xml b/rules/rules-reviewed/eap8/eap7/deprecated-initialcontextfactory-is-removed.windup.xml new file mode 100644 index 000000000..7e8f4bd22 --- /dev/null +++ b/rules/rules-reviewed/eap8/eap7/deprecated-initialcontextfactory-is-removed.windup.xml @@ -0,0 +1,34 @@ + + + + + This ruleset provides analysis of Java EE applications that need to change their sources due to the removal of deprecated InitialContextFactory class. + + + + + + + + + + + + + + + + + + + + + Replace this class with `org.wildfly.naming.client.WildFlyInitialContextFactory`. + JakartaEE + + + + + diff --git a/rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/DeprecatedInitialcontextfactoryIsRemoved.java b/rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/DeprecatedInitialcontextfactoryIsRemoved.java new file mode 100644 index 000000000..444b0b359 --- /dev/null +++ b/rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/DeprecatedInitialcontextfactoryIsRemoved.java @@ -0,0 +1,10 @@ +import org.jboss.naming.remote.client.InitialContextFactory; + +public class DeprecatedInitialcontextfactoryIsRemoved { + + String propertyValue = "org.jboss.naming.remote.client.InitialContextFactory"; + + public String getDeprecatedClassName() { + return InitialContextFactory.class.getName(); + } +} \ No newline at end of file diff --git a/rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/deprecated-initialcontextfactory-is-removed.wsdl b/rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/deprecated-initialcontextfactory-is-removed.wsdl new file mode 100644 index 000000000..73abc0a67 --- /dev/null +++ b/rules/rules-reviewed/eap8/eap7/tests/data/deprecated-initialcontextfactory-is-removed/deprecated-initialcontextfactory-is-removed.wsdl @@ -0,0 +1,8 @@ + + + org.jboss.naming.remote.client.InitialContextFactory + + \ No newline at end of file diff --git a/rules/rules-reviewed/eap8/eap7/tests/deprecated-initialcontextfactory-is-removed.windup.test.xml b/rules/rules-reviewed/eap8/eap7/tests/deprecated-initialcontextfactory-is-removed.windup.test.xml new file mode 100644 index 000000000..8d0e13123 --- /dev/null +++ b/rules/rules-reviewed/eap8/eap7/tests/deprecated-initialcontextfactory-is-removed.windup.test.xml @@ -0,0 +1,24 @@ + + + data/deprecated-initialcontextfactory-is-removed + ../deprecated-initialcontextfactory-is-removed.windup.xml + + + + + + + + + + + + + + + + + \ No newline at end of file