From 4e1c8f21208b1e6729e160a6cbf59f50359e29d0 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 | 33 +++++++++++++++++ ...recatedInitialcontextfactoryIsRemoved.java | 10 ++++++ ...ated-initialcontextfactory-is-removed.wsdl | 8 +++++ ...lcontextfactory-is-removed.windup.test.xml | 36 +++++++++++++++++++ 4 files changed, 87 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..477bb58b7 --- /dev/null +++ b/rules/rules-reviewed/eap8/eap7/deprecated-initialcontextfactory-is-removed.windup.xml @@ -0,0 +1,33 @@ + + + + + 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..a404a41c2 --- /dev/null +++ b/rules/rules-reviewed/eap8/eap7/tests/deprecated-initialcontextfactory-is-removed.windup.test.xml @@ -0,0 +1,36 @@ + + + data/deprecated-initialcontextfactory-is-removed + ../deprecated-initialcontextfactory-is-removed.windup.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file