diff --git a/environments/se/core/src/main/java/org/jboss/weld/environment/se/Weld.java b/environments/se/core/src/main/java/org/jboss/weld/environment/se/Weld.java
index 3ab939738ac..ac0252f5e47 100644
--- a/environments/se/core/src/main/java/org/jboss/weld/environment/se/Weld.java
+++ b/environments/se/core/src/main/java/org/jboss/weld/environment/se/Weld.java
@@ -196,13 +196,6 @@ public class Weld extends SeContainerInitializer implements ContainerInstanceFac
*/
public static final String ARCHIVE_ISOLATION_SYSTEM_PROPERTY = "org.jboss.weld.se.archive.isolation";
- /**
- * Since Weld 5.1.0.Final, this property is deprecated and serves no purpose.
- * It will be removed in future versions.
- */
- @Deprecated(since = "5.1.0.Final")
- public static final String DEV_MODE_SYSTEM_PROPERTY = "org.jboss.weld.development";
-
/**
* Standard behavior is that empty {@code beans.xml} is treated as discovery mode {@code annotated}.
* This configuration property allows to change the behavior to discovery mode {@code all} which is how it used to work
@@ -949,18 +942,6 @@ public Weld scanClasspathEntries() {
return property(SCAN_CLASSPATH_ENTRIES_SYSTEM_PROPERTY, true);
}
- /**
- * Since Weld 5.1.0.Final, this method is deprecated and became no-op.
- * It will be removed in future versions.
- *
- * @return self
- * @see #DEV_MODE_SYSTEM_PROPERTY
- */
- @Deprecated(since = "5.1.0.Final")
- public Weld enableDevMode() {
- return property(DEV_MODE_SYSTEM_PROPERTY, true);
- }
-
/**
* Registers annotations which will be considered as bean defining annotations.
*
diff --git a/environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldContainer.java b/environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldContainer.java
index 07b64d057a6..dec5b1f358f 100644
--- a/environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldContainer.java
+++ b/environments/se/core/src/main/java/org/jboss/weld/environment/se/WeldContainer.java
@@ -16,6 +16,8 @@
*/
package org.jboss.weld.environment.se;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -249,12 +251,16 @@ private void fireContainerInitializedEvent() {
}
/**
- * Provides access to all beans within the application. Retained for backward compatibility - WeldContainer implements
- * {@linkjakarta.enterprise.inject.Instance}.
+ * Deprecated - {@code WeldContainer} implements {@linkjakarta.enterprise.inject.Instance} and applications can
+ * therefore directly perform programmatic lookup from this object.
+ * See {@link #select(Type, Annotation...)} and other methods.
+ *
+ * Provides access to all beans within the application.
*
* @return the instance
* @deprecated Applications are encouraged to use methods for programmatic lookup directly.
*/
+ @Deprecated(forRemoval = true)
public Instance instance() {
checkState();
return getInstance();
diff --git a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainEmptyArgsTest.java b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainEmptyArgsTest.java
index 94806f2b959..b0ac076862c 100644
--- a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainEmptyArgsTest.java
+++ b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainEmptyArgsTest.java
@@ -46,7 +46,7 @@ public void init() {
public void testMainEmptyArgs() {
WeldContainer container = startMain.go();
- MainTestBean mainTestBean = container.instance().select(MainTestBean.class).get();
+ MainTestBean mainTestBean = container.select(MainTestBean.class).get();
assertNotNull(mainTestBean);
ParametersTestBean paramsBean = mainTestBean.getParametersTestBean();
diff --git a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainTest.java b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainTest.java
index a9fa29b5e3e..3177e618f3c 100644
--- a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainTest.java
+++ b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/StartMainTest.java
@@ -53,7 +53,7 @@ public void testMain() {
assertEquals(container.getId(), RegistrySingletonProvider.STATIC_INSTANCE);
- MainTestBean mainTestBean = container.instance().select(MainTestBean.class).get();
+ MainTestBean mainTestBean = container.select(MainTestBean.class).get();
assertNotNull(mainTestBean);
ParametersTestBean paramsBean = mainTestBean.getParametersTestBean();
diff --git a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/WeldMainTest.java b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/WeldMainTest.java
index 875139e55e3..413c0ceac28 100644
--- a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/WeldMainTest.java
+++ b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/WeldMainTest.java
@@ -43,7 +43,7 @@ public void testInitialize() {
Weld weld = new Weld();
WeldContainer container = weld.initialize();
- MainTestBean mainTestBean = container.instance().select(MainTestBean.class).get();
+ MainTestBean mainTestBean = container.select(MainTestBean.class).get();
assertNotNull(mainTestBean);
ParametersTestBean paramsBean = mainTestBean.getParametersTestBean();
diff --git a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/container/isolation/ContainerIsolationTest.java b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/container/isolation/ContainerIsolationTest.java
index 8984787c48c..0d17248bc78 100644
--- a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/container/isolation/ContainerIsolationTest.java
+++ b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/container/isolation/ContainerIsolationTest.java
@@ -40,7 +40,7 @@ public void testContainerIsolation() {
Weld weld2 = new Weld("2");
WeldContainer weldContainer2 = weld2.initialize();
- Foo foo2 = weldContainer2.instance().select(Foo.class).get();
+ Foo foo2 = weldContainer2.select(Foo.class).get();
foo1.setValue(1);
foo2.setValue(2);
diff --git a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/inheritance/PostConstructInheritanceTest.java b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/inheritance/PostConstructInheritanceTest.java
index da4f5bd1e56..0b16730e8d2 100644
--- a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/inheritance/PostConstructInheritanceTest.java
+++ b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/inheritance/PostConstructInheritanceTest.java
@@ -37,7 +37,7 @@ public void testPostConstructInherited() {
Plant.postConstructCalled = false;
WeldContainer weldContainer = weld.initialize();
- weldContainer.instance().select(Tree.class).get();
+ weldContainer.select(Tree.class).get();
assertTrue(Plant.postConstructCalled);
} finally {
diff --git a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/instance/SimpleInstanceTest.java b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/instance/SimpleInstanceTest.java
index 0db53b8550b..ee48922530c 100644
--- a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/instance/SimpleInstanceTest.java
+++ b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/instance/SimpleInstanceTest.java
@@ -15,8 +15,8 @@ public void testSelect() throws Exception {
Weld weld = new Weld();
try {
WeldContainer wc = weld.initialize();
- Assert.assertNotNull(wc.instance().select(KPT.class).select(new KPQLiteral()).get());
- Assert.assertNotNull(wc.instance().select(KPT.class, new KPQLiteral()).get());
+ Assert.assertNotNull(wc.select(KPT.class).select(new KPQLiteral()).get());
+ Assert.assertNotNull(wc.select().select(KPT.class, new KPQLiteral()).get());
} finally {
weld.shutdown();
}
diff --git a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/singleton/SingletonContextTest.java b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/singleton/SingletonContextTest.java
index ccab137e53c..5708d57c852 100644
--- a/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/singleton/SingletonContextTest.java
+++ b/environments/se/core/src/test/java/org/jboss/weld/environment/se/test/singleton/SingletonContextTest.java
@@ -33,7 +33,7 @@ public class SingletonContextTest {
public void testSingletonBeanLifecycle() {
Weld weld = new Weld();
WeldContainer container = weld.initialize();
- assertEquals("bar", container.instance().select(Translator.class).get().translate("hello"));
+ assertEquals("bar", container.select().select(Translator.class).get().translate("hello"));
assertTrue(Translator.isInitCallbackInvoked);
assertTrue(Dictionary.isInitCallbackInvoked);
weld.shutdown();
diff --git a/impl/src/main/java/org/jboss/weld/Container.java b/impl/src/main/java/org/jboss/weld/Container.java
index 89c28e13671..c9507849462 100644
--- a/impl/src/main/java/org/jboss/weld/Container.java
+++ b/impl/src/main/java/org/jboss/weld/Container.java
@@ -172,14 +172,6 @@ public BeanManagerImpl getBeanManager(String key) {
return managers.get(key);
}
- /**
- * @deprecated Use {@link #getBeanManager(String)} instead
- */
- @Deprecated
- public BeanManagerImpl activityManager(String key) {
- return getBeanManager(key);
- }
-
private String addBeanManager(BeanManagerImpl manager) {
String id = manager.getId();
if (manager.getId() == null) {
diff --git a/impl/src/main/java/org/jboss/weld/annotated/enhanced/EnhancedAnnotated.java b/impl/src/main/java/org/jboss/weld/annotated/enhanced/EnhancedAnnotated.java
index 8e7be0632b4..7793e9fa295 100644
--- a/impl/src/main/java/org/jboss/weld/annotated/enhanced/EnhancedAnnotated.java
+++ b/impl/src/main/java/org/jboss/weld/annotated/enhanced/EnhancedAnnotated.java
@@ -16,6 +16,8 @@
*/
package org.jboss.weld.annotated.enhanced;
+import static org.jboss.weld.util.reflection.Reflections.EMPTY_ANNOTATIONS;
+
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Set;
@@ -30,8 +32,7 @@
import org.jboss.weld.util.collections.Arrays2;
/**
- * AnnotatedItem provides a uniform access to the annotations on an annotated
- * item defined either in Java or XML
+ * AnnotatedItem provides uniform access to the annotations on an annotated item defined either in Java or XML
*
* @author Pete Muir
*/
@@ -61,25 +62,27 @@ public interface EnhancedAnnotated extends Annotated {
/**
* Gets the binding types for this element
+ *
+ * This reflection type should not know about CDI qualifiers.
+ * However, it is very convenient, so we keep it here.
*
* @returns A set of binding types present on the type. Returns an empty set
* if there are no matches.
- * @deprecated This reflection type should not know about JSR-299 binding
- * types
*/
- @Deprecated
Set getQualifiers();
/**
* Gets the binding types for this element
+ *
+ * This reflection type should not know about CDI qualifiers.
+ * However, it is very convenient, so we keep it here.
*
* @returns An array of binding types present on the type. Returns an empty
* array if there are no matches.
- * @deprecated This reflection type should not know about JSR-299 binding
- * types
*/
- @Deprecated
- Annotation[] getBindingsAsArray();
+ default Annotation[] getBindingsAsArray() {
+ return getQualifiers().toArray(EMPTY_ANNOTATIONS);
+ }
/**
* Get the type hierarchy of any interfaces implemented by this class.
diff --git a/impl/src/main/java/org/jboss/weld/annotated/enhanced/jlr/AbstractEnhancedAnnotated.java b/impl/src/main/java/org/jboss/weld/annotated/enhanced/jlr/AbstractEnhancedAnnotated.java
index 5fea3b3a9f8..c46f5f3e557 100644
--- a/impl/src/main/java/org/jboss/weld/annotated/enhanced/jlr/AbstractEnhancedAnnotated.java
+++ b/impl/src/main/java/org/jboss/weld/annotated/enhanced/jlr/AbstractEnhancedAnnotated.java
@@ -17,7 +17,6 @@
package org.jboss.weld.annotated.enhanced.jlr;
import static org.jboss.weld.util.collections.WeldCollections.immutableMapView;
-import static org.jboss.weld.util.reflection.Reflections.EMPTY_ANNOTATIONS;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
@@ -225,7 +224,6 @@ public Set getMetaAnnotations(Class extends Annotation> metaAnnota
return ImmutableSet.copyOf(metaAnnotationMap.get(metaAnnotationType));
}
- @Deprecated
public Set getQualifiers() {
Set qualifiers = getMetaAnnotations(Qualifier.class);
if (qualifiers.size() > 0) {
@@ -235,11 +233,6 @@ public Set getQualifiers() {
}
}
- @Deprecated
- public Annotation[] getBindingsAsArray() {
- return getQualifiers().toArray(EMPTY_ANNOTATIONS);
- }
-
public A getAnnotation(Class annotationType) {
return annotationType.cast(annotationMap.get(annotationType));
}
diff --git a/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyInstantiator.java b/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyInstantiator.java
index 69509a3ab25..72ca05360f3 100644
--- a/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyInstantiator.java
+++ b/impl/src/main/java/org/jboss/weld/bean/proxy/ProxyInstantiator.java
@@ -131,8 +131,7 @@ public static ProxyInstantiator create(WeldConfiguration configuration) {
result = DefaultProxyInstantiator.INSTANCE;
}
} else {
- result = create(configuration.getBooleanProperty(ConfigurationKey.RELAXED_CONSTRUCTION)
- || configuration.getBooleanProperty(ConfigurationKey.PROXY_UNSAFE));
+ result = create(configuration.getBooleanProperty(ConfigurationKey.RELAXED_CONSTRUCTION));
}
BootstrapLogger.LOG.debugv("Using instantiator: {0}", result.getClass().getName());
return result;
diff --git a/impl/src/main/java/org/jboss/weld/bootstrap/WeldStartup.java b/impl/src/main/java/org/jboss/weld/bootstrap/WeldStartup.java
index 5294fe6fe2b..56204bbe9ee 100644
--- a/impl/src/main/java/org/jboss/weld/bootstrap/WeldStartup.java
+++ b/impl/src/main/java/org/jboss/weld/bootstrap/WeldStartup.java
@@ -146,7 +146,7 @@
public class WeldStartup {
static {
- VersionLogger.LOG.version(Formats.version(null));
+ VersionLogger.LOG.version(Formats.version());
}
private BeanManagerImpl deploymentManager;
diff --git a/impl/src/main/java/org/jboss/weld/config/ConfigurationKey.java b/impl/src/main/java/org/jboss/weld/config/ConfigurationKey.java
index 119796a649f..d6907295719 100644
--- a/impl/src/main/java/org/jboss/weld/config/ConfigurationKey.java
+++ b/impl/src/main/java/org/jboss/weld/config/ConfigurationKey.java
@@ -118,8 +118,7 @@ public enum ConfigurationKey {
/**
* Weld supports a non-standard workaround to be able to create client proxies for Java types that cannot be proxied by the
- * container, using non-portable
- * JVM APIs.
+ * container, using non-portable JVM APIs.
*/
@Description("Weld supports a non-standard workaround to be able to create client proxies for Java types that cannot be proxied by the container, using non-portable JVM APIs.")
RELAXED_CONSTRUCTION("org.jboss.weld.construction.relaxed", false),
@@ -130,16 +129,6 @@ public enum ConfigurationKey {
*/
PROXY_INSTANTIATOR("org.jboss.weld.proxy.instantiator", ""),
- /**
- * Weld supports a non-standard workaround to be able to create client proxies for Java types that cannot be proxied by the
- * container, using non-portable
- * JVM APIs.
- *
- * @deprecated this option is deprecated. RELAXED_CONSTRUCTION should be used instead
- */
- @Description("This option is deprecated - org.jboss.weld.construction.relaxed should be used instead.")
- PROXY_UNSAFE("org.jboss.weld.proxy.unsafe", false),
-
/**
* XML descriptor validation is enabled by default.
*/
@@ -154,30 +143,6 @@ public enum ConfigurationKey {
@Description("For certain combinations of scopes, the container is permitted to optimize an injectable reference lookup. The optimization is disabled by default.")
INJECTABLE_REFERENCE_OPTIMIZATION("org.jboss.weld.injection.injectableReferenceOptimization", false),
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE("org.jboss.weld.probe.invocationMonitor.excludeType", ""),
-
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES("org.jboss.weld.probe.invocationMonitor.skipJavaBeanProperties", true),
-
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_EVENT_MONITOR_EXCLUDE_TYPE("org.jboss.weld.probe.eventMonitor.excludeType", ""),
-
/**
* This optimization is used to reduce the HTTP session replication overhead. However, the inconsistency detection mechanism
* may cause problems in some
@@ -186,14 +151,6 @@ public enum ConfigurationKey {
@Description("This optimization is used to reduce the HTTP session replication overhead. However, the inconsistency detection mechanism may cause problems in some development environments.")
BEAN_IDENTIFIER_INDEX_OPTIMIZATION("org.jboss.weld.serialization.beanIdentifierIndexOptimization", true),
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_EMBED_INFO_SNIPPET("org.jboss.weld.probe.embedInfoSnippet", true),
-
/**
* If set to true, the attributes should be fetched lazily from the backing store for some contexts (e.g.
* attributes of an HTTP session for a
@@ -202,31 +159,6 @@ public enum ConfigurationKey {
@Description("If set to true, the attributes should be fetched lazily from the backing store for some contexts (e.g. attributes of an HTTP session for a session context).")
CONTEXT_ATTRIBUTES_LAZY_FETCH("org.jboss.weld.context.attributes.lazyFetch", true),
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_JMX_SUPPORT("org.jboss.weld.probe.jmxSupport", false),
-
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_EVENT_MONITOR_CONTAINER_LIFECYCLE_EVENTS("org.jboss.weld.probe.eventMonitor.containerLifecycleEvents", false),
-
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_ALLOW_REMOTE_ADDRESS("org.jboss.weld.probe.allowRemoteAddress",
- "127.0.0.1|::1|::1%.+|0:0:0:0:0:0:0:1|0:0:0:0:0:0:0:1%.+"),
-
/**
* Weld supports a non-standard workaround to be able to create proxies for Java types which declare non-private non-static
* final methods. These methods are
@@ -284,14 +216,6 @@ public enum ConfigurationKey {
@Description("A regular expression. If a non-empty string, then all annotated types whose jakarta.enterprise.inject.spi.AnnotatedType#getJavaClass().getName() matches this pattern are vetoed if not annotated with a bean defining annotation.")
VETO_TYPES_WITHOUT_BEAN_DEFINING_ANNOTATION("org.jboss.weld.bootstrap.vetoTypesWithoutBeanDefiningAnnotation", ""),
- /**
- * This option is deprecated and has no function since Weld 5.1.0.Final.
- * It will be removed in upcoming versions.
- */
- @Deprecated(since = "5.1.0.Final")
- @Description("This option is deprecated and has no function since Weld 5.1.0.Final.")
- PROBE_EXPORT_DATA_AFTER_DEPLOYMENT("org.jboss.weld.probe.exportDataAfterDeployment", ""),
-
/**
* If set to true:
*
diff --git a/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java b/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java
index 2aee2a2bd74..27a520a6156 100644
--- a/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java
+++ b/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java
@@ -749,21 +749,6 @@ public Object getReference(Bean> bean, Type requestedType, CreationalContext
}
}
- /**
- * The name of this method was misleading, use {@link #getInjectableReference(InjectionPoint, Bean, CreationalContext)}
- * instead.
- *
- * @param injectionPoint
- * @param resolvedBean
- * @param creationalContext
- * @return the injectable reference
- * @deprecated Use {@link #getInjectableReference(InjectionPoint, Bean, CreationalContext)} instead
- */
- @Deprecated
- public Object getReference(InjectionPoint injectionPoint, Bean> resolvedBean, CreationalContext> creationalContext) {
- return getInjectableReference(injectionPoint, resolvedBean, creationalContext);
- }
-
/**
* Get a reference, registering the injection point used.
*
diff --git a/impl/src/main/java/org/jboss/weld/util/reflection/Formats.java b/impl/src/main/java/org/jboss/weld/util/reflection/Formats.java
index 1c5b0baa8db..fb07976cd7e 100644
--- a/impl/src/main/java/org/jboss/weld/util/reflection/Formats.java
+++ b/impl/src/main/java/org/jboss/weld/util/reflection/Formats.java
@@ -128,7 +128,6 @@ public static String formatAsStackTraceElement(Member member) {
* means of reflection calls.
*
* @param member
- * @param resourceLoader
* @return the line number or 0 if it's not possible to find it
*/
public static int getLineNumber(Member member) {
@@ -512,10 +511,9 @@ public static String formatAnnotations(Annotation[] annotations) {
/**
*
- * @param pkg This param is completely ignored
* @return the formatted version
*/
- public static String version(@Deprecated Package pkg) {
+ public static String version() {
String version = null;
String timestamp = null;
// First try the weld-build.properties file
diff --git a/impl/src/test/java/org/jboss/weld/tests/unit/config/ConfigurationKeyTest.java b/impl/src/test/java/org/jboss/weld/tests/unit/config/ConfigurationKeyTest.java
index ba00d213f05..885bf703b75 100644
--- a/impl/src/test/java/org/jboss/weld/tests/unit/config/ConfigurationKeyTest.java
+++ b/impl/src/test/java/org/jboss/weld/tests/unit/config/ConfigurationKeyTest.java
@@ -21,7 +21,6 @@
import static org.junit.Assert.assertTrue;
import java.util.List;
-import java.util.regex.Pattern;
import org.jboss.weld.config.ConfigurationKey;
import org.junit.Test;
@@ -64,14 +63,4 @@ public void testIsValidValueType() {
assertTrue(ConfigurationKey.CONCURRENT_DEPLOYMENT.isValidValueType(Boolean.class));
}
- @Test
- public void testAllowRemoteAddressDefaultValue() {
- Pattern allowRemoteAddress = Pattern.compile(ConfigurationKey.PROBE_ALLOW_REMOTE_ADDRESS.getDefaultValue().toString());
- assertTrue(allowRemoteAddress.matcher("127.0.0.1").matches());
- assertTrue(allowRemoteAddress.matcher("::1").matches());
- assertTrue(allowRemoteAddress.matcher("::1%0").matches());
- assertTrue(allowRemoteAddress.matcher("0:0:0:0:0:0:0:1").matches());
- assertTrue(allowRemoteAddress.matcher("0:0:0:0:0:0:0:1%eth0").matches());
- }
-
}
diff --git a/modules/jsf/src/main/java/org/jboss/weld/module/jsf/servlet/ConversationPropagationFilter.java b/modules/jsf/src/main/java/org/jboss/weld/module/jsf/servlet/ConversationPropagationFilter.java
deleted file mode 100644
index 91702e503e1..00000000000
--- a/modules/jsf/src/main/java/org/jboss/weld/module/jsf/servlet/ConversationPropagationFilter.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.module.jsf.servlet;
-
-import java.io.IOException;
-
-import jakarta.enterprise.context.Conversation;
-import jakarta.enterprise.context.spi.Context;
-import jakarta.enterprise.inject.Instance;
-import jakarta.faces.context.FacesContext;
-import jakarta.servlet.Filter;
-import jakarta.servlet.FilterChain;
-import jakarta.servlet.FilterConfig;
-import jakarta.servlet.ServletException;
-import jakarta.servlet.ServletRequest;
-import jakarta.servlet.ServletResponse;
-import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpServletResponse;
-import jakarta.servlet.http.HttpServletResponseWrapper;
-
-import org.jboss.weld.Container;
-import org.jboss.weld.bootstrap.api.helpers.RegistrySingletonProvider;
-import org.jboss.weld.context.ConversationContext;
-import org.jboss.weld.context.http.HttpConversationContext;
-import org.jboss.weld.module.jsf.FacesUrlTransformer;
-
-/**
- *
- * A Filter for handling conversation propagation over redirects.
- *
- *
- *
- * This filter intercepts the call to
- * {@link HttpServletResponse#sendRedirect(String)} and appends the conversation
- * id request parameter to the URL if the conversation is long-running, but only
- * if the request parameter is not already present.
- *
- *
- * @author Nicklas Karlsson
- * @deprecated See also WELD-1262 and JBPAPP6-1664
- */
-@Deprecated
-public class ConversationPropagationFilter implements Filter {
- private String contextId;
-
- public void init(FilterConfig config) throws ServletException {
- contextId = (String) config.getServletContext().getAttribute(Container.CONTEXT_ID_KEY);
- if (contextId == null) {
- contextId = RegistrySingletonProvider.STATIC_INSTANCE;
- }
- }
-
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
- throws IOException, ServletException {
- if (request instanceof HttpServletRequest && response instanceof HttpServletResponse) {
- response = wrapResponse((HttpServletResponse) response, ((HttpServletRequest) request).getContextPath());
- }
- chain.doFilter(request, response);
- }
-
- public void destroy() {
- }
-
- private ServletResponse wrapResponse(HttpServletResponse response, final String requestPath) {
- return new HttpServletResponseWrapper(response) {
- @Override
- public void sendRedirect(String path) throws IOException {
- FacesContext context = FacesContext.getCurrentInstance();
- if (context != null) { // this is a JSF request
- ConversationContext conversationContext = instance(contextId).select(HttpConversationContext.class).get();
- if (conversationContext.isActive()) {
- Conversation conversation = conversationContext.getCurrentConversation();
- if (!conversation.isTransient()) {
- path = new FacesUrlTransformer(path, context)
- .toRedirectViewId()
- .toActionUrl()
- .appendConversationIdIfNecessary(conversationContext.getParameterName(),
- conversation.getId())
- .encode();
- }
- }
- }
- super.sendRedirect(path);
- }
- };
- }
-
- private static Instance instance(String id) {
- return Container.instance(id).deploymentManager().instance().select(Context.class);
- }
-}
diff --git a/modules/web/src/main/java/org/jboss/weld/module/web/servlet/WeldListener.java b/modules/web/src/main/java/org/jboss/weld/module/web/servlet/WeldListener.java
deleted file mode 100644
index b16574b027f..00000000000
--- a/modules/web/src/main/java/org/jboss/weld/module/web/servlet/WeldListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2013, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.module.web.servlet;
-
-/**
- * @deprecated Renamed to WeldInitialListener
- *
- * @author Marko Luksa
- */
-@Deprecated
-public class WeldListener extends WeldInitialListener {
-
-}
diff --git a/tests-common/src/main/java/org/jboss/weld/test/util/annotated/ForwardingWeldAnnotated.java b/tests-common/src/main/java/org/jboss/weld/test/util/annotated/ForwardingWeldAnnotated.java
index 29014d4e5dc..e3fcd620f5a 100644
--- a/tests-common/src/main/java/org/jboss/weld/test/util/annotated/ForwardingWeldAnnotated.java
+++ b/tests-common/src/main/java/org/jboss/weld/test/util/annotated/ForwardingWeldAnnotated.java
@@ -42,16 +42,10 @@ public Set getMetaAnnotations(Class extends Annotation> metaAnnota
return delegate().getMetaAnnotations(metaAnnotationType);
}
- @Deprecated
public Set getQualifiers() {
return delegate().getQualifiers();
}
- @Deprecated
- public Annotation[] getBindingsAsArray() {
- return delegate().getBindingsAsArray();
- }
-
public String getName() {
return delegate().getName();
}
diff --git a/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/LiteExtensionTranslator.java b/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/LiteExtensionTranslator.java
index e3610cd7ba3..d85c740b597 100644
--- a/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/LiteExtensionTranslator.java
+++ b/weld-lite-extension-translator/src/main/java/org/jboss/weld/lite/extension/translator/LiteExtensionTranslator.java
@@ -44,9 +44,10 @@ public LiteExtensionTranslator() {
}
/**
- * Deprecated, use {@link LiteExtensionTranslator#LiteExtensionTranslator(Collection, ClassLoader)}
+ * Deprecated, use {@link LiteExtensionTranslator#LiteExtensionTranslator(Collection, ClassLoader)}.
+ * This method will be removed in future versions.
*/
- @Deprecated
+ @Deprecated(forRemoval = true)
public LiteExtensionTranslator(List> buildCompatibleExtensions, ClassLoader cl) {
this((Collection>) buildCompatibleExtensions, cl);
}