diff --git a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcProcessor.java b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcProcessor.java index 127e3310b0d00..5327ef0b6b3df 100644 --- a/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcProcessor.java +++ b/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/ArcProcessor.java @@ -783,7 +783,7 @@ public void registerField(FieldInfo fieldInfo) { ResultHandle injectionPointAnnotations = BeanGenerator.collectInjectionPointAnnotations(null, null, beanDeployment, mc, injectionPoint, annotationLiterals, - annotationName -> !annotationName.equals(DotNames.DEPRECATED)); + beanRegistrationPhase.getBeanProcessor().getInjectionPointAnnotationsPredicate()); ResultHandle javaMember = BeanGenerator.getJavaMemberHandle(mc, injectionPoint, ReflectionRegistration.NOOP); ResultHandle container = mc diff --git a/extensions/arc/runtime/src/main/resources/META-INF/services/io.quarkus.runtime.InterceptorBindingService$Provider b/extensions/arc/runtime/src/main/resources/META-INF/services/io.quarkus.runtime.InterceptorBindingService$Provider deleted file mode 100644 index 2b70cdf694fbd..0000000000000 --- a/extensions/arc/runtime/src/main/resources/META-INF/services/io.quarkus.runtime.InterceptorBindingService$Provider +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2018 Red Hat, Inc. -# -# 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 -# -# https://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. -# - -# -# Copyright 2018 Red Hat Pty Ltd -# -# 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 -# -# https://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. -# - -io.quarkus.arc.runtime.InterceptorBindingProvider \ No newline at end of file diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanProcessor.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanProcessor.java index 2914a12021e8f..e2127e754a940 100644 --- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanProcessor.java +++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanProcessor.java @@ -99,7 +99,7 @@ private BeanProcessor(Builder builder) { this.beanDeployment = new BeanDeployment(buildContext, builder); // Make it configurable if we find that the set of annotations needs to grow - this.injectionPointAnnotationsPredicate = annotationName -> !annotationName.equals(DotNames.DEPRECATED); + this.injectionPointAnnotationsPredicate = Predicate.not(DotNames.DEPRECATED::equals); } public ContextRegistrar.RegistrationContext registerCustomContexts() { @@ -265,6 +265,10 @@ public void accept(BytecodeTransformer transformer) { return beanDeployment; } + public Predicate getInjectionPointAnnotationsPredicate() { + return injectionPointAnnotationsPredicate; + } + public static class Builder { String name; diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InterceptorBindingRegistrar.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InterceptorBindingRegistrar.java index 6311d295dc800..140ee5f593fe5 100644 --- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InterceptorBindingRegistrar.java +++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InterceptorBindingRegistrar.java @@ -1,12 +1,8 @@ package io.quarkus.arc.processor; import java.lang.annotation.Annotation; -import java.util.ArrayList; -import java.util.Collection; import java.util.Collections; import java.util.List; -import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import java.util.function.Predicate; import javax.enterprise.util.Nonbinding; @@ -14,30 +10,11 @@ public interface InterceptorBindingRegistrar extends BuildExtension { - /** - * Annotations in a form of {@link DotName} to be considered interceptor bindings. - * Optionally, mapped to a {@link Collection} of non-binding fields - * - * @deprecated Use {@link #getAdditionalBindings()} instead. - */ - @Deprecated(forRemoval = true) - default Map> registerAdditionalBindings() { - return Collections.emptyMap(); - } - /** * @return the list of additional interceptor bindings */ default List getAdditionalBindings() { - Map> map = registerAdditionalBindings(); - if (map.isEmpty()) { - return Collections.emptyList(); - } - List bindings = new ArrayList<>(); - for (Entry> e : map.entrySet()) { - bindings.add(InterceptorBinding.of(e.getKey(), e.getValue())); - } - return bindings; + return Collections.emptyList(); } /** diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/MethodDescriptors.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/MethodDescriptors.java index 3bffc258f5fef..06622c2f085a3 100644 --- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/MethodDescriptors.java +++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/MethodDescriptors.java @@ -18,7 +18,6 @@ import io.quarkus.arc.impl.InterceptorInvocation; import io.quarkus.arc.impl.InvocationContexts; import io.quarkus.arc.impl.MapValueSupplier; -import io.quarkus.arc.impl.Objects; import io.quarkus.arc.impl.Reflections; import io.quarkus.arc.impl.RemovedBeanImpl; import io.quarkus.arc.impl.Sets; @@ -84,33 +83,8 @@ public final class MethodDescriptors { public static final MethodDescriptor OBJECT_EQUALS = MethodDescriptor.ofMethod(Object.class, "equals", boolean.class, Object.class); - /** - * No longer used - will be deleted - * - * @deprecated - */ - @Deprecated - public static final MethodDescriptor OBJECT_HASH_CODE = MethodDescriptor.ofMethod(Object.class, "hashCode", int.class); - - /** - * No longer used - will be deleted - * - * @deprecated - */ - @Deprecated - public static final MethodDescriptor OBJECT_TO_STRING = MethodDescriptor.ofMethod(Object.class, "toString", String.class); - public static final MethodDescriptor OBJECT_CONSTRUCTOR = MethodDescriptor.ofConstructor(Object.class); - /** - * No longer used - will be deleted - * - * @deprecated - */ - @Deprecated - public static final MethodDescriptor OBJECTS_REFERENCE_EQUALS = MethodDescriptor.ofMethod(Objects.class, "referenceEquals", - boolean.class, Object.class, Object.class); - public static final MethodDescriptor INTERCEPTOR_INVOCATION_POST_CONSTRUCT = MethodDescriptor.ofMethod( InterceptorInvocation.class, "postConstruct", diff --git a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/Objects.java b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/Objects.java deleted file mode 100644 index 943e4c1288039..0000000000000 --- a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/Objects.java +++ /dev/null @@ -1,16 +0,0 @@ -package io.quarkus.arc.impl; - -/** - * @deprecated will be removed. Use Gizmo's ifReferencesEqual instead. - */ -@Deprecated -public final class Objects { - - private Objects() { - } - - // https://github.com/quarkusio/gizmo/issues/50 - public static boolean referenceEquals(Object obj1, Object obj2) { - return obj1 == obj2; - } -}