Skip to content

Commit

Permalink
Merge pull request #22102 from mkouba/arc-2.7-cleanup
Browse files Browse the repository at this point in the history
ArC cleanup - remove some deprecated stuff
  • Loading branch information
Sanne authored Dec 10, 2021
2 parents 98a85ae + d497ead commit 480337a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -265,6 +265,10 @@ public void accept(BytecodeTransformer transformer) {
return beanDeployment;
}

public Predicate<DotName> getInjectionPointAnnotationsPredicate() {
return injectionPointAnnotationsPredicate;
}

public static class Builder {

String name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,20 @@
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;
import org.jboss.jandex.DotName;

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<DotName, Set<String>> registerAdditionalBindings() {
return Collections.emptyMap();
}

/**
* @return the list of additional interceptor bindings
*/
default List<InterceptorBinding> getAdditionalBindings() {
Map<DotName, Set<String>> map = registerAdditionalBindings();
if (map.isEmpty()) {
return Collections.emptyList();
}
List<InterceptorBinding> bindings = new ArrayList<>();
for (Entry<DotName, Set<String>> e : map.entrySet()) {
bindings.add(InterceptorBinding.of(e.getKey(), e.getValue()));
}
return bindings;
return Collections.emptyList();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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",
Expand Down

This file was deleted.

0 comments on commit 480337a

Please sign in to comment.