Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArC cleanup - remove some deprecated stuff #22102

Merged
merged 1 commit into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.