From ac2fb23cd4c7a07f7b83e82634a638f92f1f44bf Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Thu, 30 Jun 2022 11:09:38 +0200 Subject: [PATCH] [WFLY-16569] Avoid Jandex 2.4.3.Final deprecated methods --- .../AroundInvokeAnnotationParsingProcessor.java | 2 +- .../SessionBeanComponentDescriptionFactory.java | 6 +++--- .../JaxrsMethodParameterProcessor.java | 6 +++--- .../jaxrs/deployment/JaxrsScanningProcessor.java | 8 ++++---- .../InboundBridgeDeploymentProcessor.java | 6 +++--- .../AbstractIntegrationProcessorJAXWS.java | 2 +- .../as/webservices/deployers/ConfigResolver.java | 4 ++-- .../deployers/WSClassVerificationProcessor.java | 2 +- .../WSIntegrationProcessorJAXWS_EJB.java | 16 ++++++++-------- .../WSHandlerChainAnnotationProcessor.java | 8 ++++---- .../org/jboss/as/webservices/util/ASHelper.java | 6 +++--- .../processors/ExternalBeanArchiveProcessor.java | 2 +- .../jboss/as/weld/discovery/AnnotationType.java | 2 +- .../as/weld/discovery/WeldClassFileInfo.java | 8 ++++---- .../as/weld/discovery/WeldClassFileServices.java | 2 +- .../xts/XTSDependenciesDeploymentProcessor.java | 2 +- 16 files changed, 41 insertions(+), 41 deletions(-) diff --git a/ee/src/main/java/org/jboss/as/ee/component/deployers/AroundInvokeAnnotationParsingProcessor.java b/ee/src/main/java/org/jboss/as/ee/component/deployers/AroundInvokeAnnotationParsingProcessor.java index bebbfa5b9ebb..66aead5b24ba 100644 --- a/ee/src/main/java/org/jboss/as/ee/component/deployers/AroundInvokeAnnotationParsingProcessor.java +++ b/ee/src/main/java/org/jboss/as/ee/component/deployers/AroundInvokeAnnotationParsingProcessor.java @@ -74,7 +74,7 @@ private void processAroundInvoke(final EEModuleDescription eeModuleDescription, final MethodInfo methodInfo = MethodInfo.class.cast(target); final ClassInfo classInfo = methodInfo.declaringClass(); final EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString()); - final List classAroundInvokes = classInfo.annotations().get(AROUND_INVOKE_ANNOTATION_NAME); + final List classAroundInvokes = classInfo.annotationsMap().get(AROUND_INVOKE_ANNOTATION_NAME); if(classAroundInvokes.size() > 1) { throw EeLogger.ROOT_LOGGER.aroundInvokeAnnotationUsedTooManyTimes(classInfo.name(), classAroundInvokes.size()); } diff --git a/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/SessionBeanComponentDescriptionFactory.java b/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/SessionBeanComponentDescriptionFactory.java index 22d0143de77a..6490b3032db0 100644 --- a/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/SessionBeanComponentDescriptionFactory.java +++ b/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/SessionBeanComponentDescriptionFactory.java @@ -279,11 +279,11 @@ private SessionType determineSessionType(final String ejbClass, final CompositeI if (info == null) { return null; } - if(info.annotations().get(STATEFUL_ANNOTATION) != null) { + if(info.annotationsMap().get(STATEFUL_ANNOTATION) != null) { return SessionType.Stateful; - } else if(info.annotations().get(STATELESS_ANNOTATION) != null) { + } else if(info.annotationsMap().get(STATELESS_ANNOTATION) != null) { return SessionType.Stateless; - } else if(info.annotations().get(SINGLETON_ANNOTATION) != null) { + } else if(info.annotationsMap().get(SINGLETON_ANNOTATION) != null) { return SessionType.Singleton; } return null; diff --git a/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsMethodParameterProcessor.java b/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsMethodParameterProcessor.java index b63a39c4ca3f..fa096ca560ee 100644 --- a/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsMethodParameterProcessor.java +++ b/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsMethodParameterProcessor.java @@ -271,7 +271,7 @@ private HashMap> getParamConverters( Object object = ctor.newInstance(); List lazyLoadAnnotations =classInfo - .annotations().get(PARAM_CONVERTER_LAZY_DOTNAME); + .annotationsMap().get(PARAM_CONVERTER_LAZY_DOTNAME); if (object instanceof ParamConverterProvider) { ParamConverterProvider pcpObj = (ParamConverterProvider) object; @@ -349,7 +349,7 @@ private ArrayList getResouceClasses(final CompositeIndex index, ClassInfo classInfo = indexer.index(stream); List defaultValuesList = - classInfo.annotations().get(DEFAULT_VALUE_DOTNAME); + classInfo.annotationsMap().get(DEFAULT_VALUE_DOTNAME); if (!defaultValuesList.isEmpty()) { classNameArr.add((classInfo).name().toString()); @@ -369,7 +369,7 @@ private ArrayList getResouceClasses(final CompositeIndex index, ClassInfo classInfo = index.getClassByName(DotName.createSimple(clazzName)); if (classInfo != null) { Map> annotationsMap = - classInfo.annotations(); + classInfo.annotationsMap(); if (annotationsMap != null && !annotationsMap.isEmpty()) { List xInstance = annotationsMap.get( diff --git a/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsScanningProcessor.java b/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsScanningProcessor.java index f707d9a71295..b9610a0e5829 100644 --- a/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsScanningProcessor.java +++ b/jaxrs/src/main/java/org/jboss/as/jaxrs/deployment/JaxrsScanningProcessor.java @@ -198,7 +198,7 @@ private void processDeclaredApplicationClasses(final DeploymentUnit du, if (cClazz.isAnnotationPresent(javax.ws.rs.Path.class)) { final ClassInfo info = resourceMap.get(cClazz.getName()); if (info != null) { - if (info.annotations().containsKey(DECORATOR)) { + if (info.annotationsMap().containsKey(DECORATOR)) { //we do not add decorators as resources //we can't pick up on programatically added decorators, but that is such an edge case it should not really matter continue; @@ -342,7 +342,7 @@ protected void scan(final DeploymentUnit du, final ClassLoader classLoader, fina //see WFLY-9752 continue; } - if(info.annotations().containsKey(DECORATOR)) { + if(info.annotationsMap().containsKey(DECORATOR)) { //we do not add decorators as resources //we can't pick up on programatically added decorators, but that is such an edge case it should not really matter continue; @@ -364,7 +364,7 @@ protected void scan(final DeploymentUnit du, final ClassLoader classLoader, fina //see WFLY-9752 continue; } - if(info.annotations().containsKey(DECORATOR)) { + if(info.annotationsMap().containsKey(DECORATOR)) { //we do not add decorators as providers //we can't pick up on programatically added decorators, but that is such an edge case it should not really matter continue; @@ -388,7 +388,7 @@ protected void scan(final DeploymentUnit du, final ClassLoader classLoader, fina continue; } - if(implementor.annotations().containsKey(DECORATOR)) { + if(implementor.annotationsMap().containsKey(DECORATOR)) { //we do not add decorators as resources //we can't pick up on programatically added decorators, but that is such an edge case it should not really matter continue; diff --git a/rts/src/main/java/org/wildfly/extension/rts/deployment/InboundBridgeDeploymentProcessor.java b/rts/src/main/java/org/wildfly/extension/rts/deployment/InboundBridgeDeploymentProcessor.java index 9752bd66a3ee..11ef1227a003 100644 --- a/rts/src/main/java/org/wildfly/extension/rts/deployment/InboundBridgeDeploymentProcessor.java +++ b/rts/src/main/java/org/wildfly/extension/rts/deployment/InboundBridgeDeploymentProcessor.java @@ -84,11 +84,11 @@ private boolean isBridgeRequired(final DeploymentUnit deploymentUnit) { if (target instanceof ClassInfo) { final ClassInfo classInfo = (ClassInfo) target; - if (classInfo.annotations().get(TRANSACTIONAL_DOT_NAME) != null) { + if (classInfo.annotationsMap().get(TRANSACTIONAL_DOT_NAME) != null) { return true; } - if (classInfo.annotations().get(STATELESS_ATTRIBUTE_DOT_NAME) != null || - classInfo.annotations().get(STATEFUL_ATTRIBUTE_DOT_NAME) != null) { + if (classInfo.annotationsMap().get(STATELESS_ATTRIBUTE_DOT_NAME) != null || + classInfo.annotationsMap().get(STATEFUL_ATTRIBUTE_DOT_NAME) != null) { return true; } } diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/AbstractIntegrationProcessorJAXWS.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/AbstractIntegrationProcessorJAXWS.java index ad36fbd05bf3..0b4f3e387d73 100644 --- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/AbstractIntegrationProcessorJAXWS.java +++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/AbstractIntegrationProcessorJAXWS.java @@ -103,7 +103,7 @@ public void configure(DeploymentPhaseContext context, ComponentConfiguration com } static boolean isEjb3(final ClassInfo clazz) { - return clazz.annotations().containsKey(STATELESS_ANNOTATION) || clazz.annotations().containsKey(SINGLETON_ANNOTATION); + return clazz.annotationsMap().containsKey(STATELESS_ANNOTATION) || clazz.annotationsMap().containsKey(SINGLETON_ANNOTATION); } } diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/ConfigResolver.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/ConfigResolver.java index 507fd0a05400..ef7025e949dc 100644 --- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/ConfigResolver.java +++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/ConfigResolver.java @@ -53,7 +53,7 @@ public class ConfigResolver extends AbstractCommonConfigResolver { public ConfigResolver(ClassInfo epClassInfo, JBossWebservicesMetaData jwmd, JBossWebMetaData jbwebmd, VirtualFile root, boolean isWar) { this.epClassInfo = epClassInfo; this.className = epClassInfo.name().toString(); - List annotations = epClassInfo.annotations().get( + List annotations = epClassInfo.annotationsMap().get( DotName.createSimple(EndpointConfig.class.getName())); if (annotations != null && !annotations.isEmpty()) { AnnotationInstance ann = annotations.get(0); @@ -90,7 +90,7 @@ protected String getEndpointClassName() { @Override protected boolean isEndpointClassAnnotated(Class annotation) { - return epClassInfo.annotations().containsKey(DotName.createSimple(annotation.getName())); + return epClassInfo.annotationsMap().containsKey(DotName.createSimple(annotation.getName())); } @Override diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java index 538b88d7bce5..be55bc78a7bf 100644 --- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java +++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSClassVerificationProcessor.java @@ -127,7 +127,7 @@ private void verifyApacheCXFModuleDependencyRequirement(DeploymentUnit unit) { AnnotationTarget at = ai.target(); if (at instanceof ClassInfo) { final ClassInfo clazz = (ClassInfo)ai.target(); - for (DotName dn : clazz.annotations().keySet()) { + for (DotName dn : clazz.annotationsMap().keySet()) { if (dn.toString().startsWith("org.apache.cxf")) { WSLogger.ROOT_LOGGER.missingModuleDependency(dn.toString(), clazz.name().toString(), "org.apache.cxf"); } diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java index 23f589feb0fa..810d0741c670 100644 --- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java +++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/deployers/WSIntegrationProcessorJAXWS_EJB.java @@ -114,8 +114,8 @@ private static void processAnnotation(final DeploymentUnit unit, final Class an } private static WebContextAnnotationWrapper getWebContextWrapper(final ClassInfo webServiceClassInfo) { - if (!webServiceClassInfo.annotations().containsKey(WEB_CONTEXT_ANNOTATION)) return new WebContextAnnotationWrapper(null); - final AnnotationInstance webContextAnnotation = webServiceClassInfo.annotations().get(WEB_CONTEXT_ANNOTATION).get(0); + if (!webServiceClassInfo.annotationsMap().containsKey(WEB_CONTEXT_ANNOTATION)) return new WebContextAnnotationWrapper(null); + final AnnotationInstance webContextAnnotation = webServiceClassInfo.annotationsMap().get(WEB_CONTEXT_ANNOTATION).get(0); return new WebContextAnnotationWrapper(webContextAnnotation); } @@ -150,8 +150,8 @@ private static Set getDeclaredSecurityRoles(final DeploymentUnit unit, f } // process @RolesAllowed annotation - if (webServiceClassInfo.annotations().containsKey(ROLES_ALLOWED_ANNOTATION)) { - final List allowedRoles = webServiceClassInfo.annotations().get(ROLES_ALLOWED_ANNOTATION); + if (webServiceClassInfo.annotationsMap().containsKey(ROLES_ALLOWED_ANNOTATION)) { + final List allowedRoles = webServiceClassInfo.annotationsMap().get(ROLES_ALLOWED_ANNOTATION); for (final AnnotationInstance allowedRole : allowedRoles) { if (allowedRole.target().equals(webServiceClassInfo)) { for (final String roleName : allowedRole.value().asStringArray()) { @@ -162,8 +162,8 @@ private static Set getDeclaredSecurityRoles(final DeploymentUnit unit, f } // process @DeclareRoles annotation - if (webServiceClassInfo.annotations().containsKey(DECLARE_ROLES_ANNOTATION)) { - final List declareRoles = webServiceClassInfo.annotations().get(DECLARE_ROLES_ANNOTATION); + if (webServiceClassInfo.annotationsMap().containsKey(DECLARE_ROLES_ANNOTATION)) { + final List declareRoles = webServiceClassInfo.annotationsMap().get(DECLARE_ROLES_ANNOTATION); for (final AnnotationInstance declareRole : declareRoles) { if (declareRole.target().equals(webServiceClassInfo)) { for (final String roleName : declareRole.value().asStringArray()) { @@ -174,8 +174,8 @@ private static Set getDeclaredSecurityRoles(final DeploymentUnit unit, f } // process @PermitAll annotation - if (webServiceClassInfo.annotations().containsKey(PERMIT_ALL_ANNOTATION)) { - for (AnnotationInstance permitAll : webServiceClassInfo.annotations().get(PERMIT_ALL_ANNOTATION)) { + if (webServiceClassInfo.annotationsMap().containsKey(PERMIT_ALL_ANNOTATION)) { + for (AnnotationInstance permitAll : webServiceClassInfo.annotationsMap().get(PERMIT_ALL_ANNOTATION)) { if (permitAll.target().equals(webServiceClassInfo)) { securityRoles.add("*"); break; diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/injection/WSHandlerChainAnnotationProcessor.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/injection/WSHandlerChainAnnotationProcessor.java index bd1222ca0845..d579578ad2bc 100644 --- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/injection/WSHandlerChainAnnotationProcessor.java +++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/injection/WSHandlerChainAnnotationProcessor.java @@ -138,12 +138,12 @@ private static void processHandlerChainAnnotations(final ResourceRoot currentRes } private static AnnotationInstance getHandlerChainAnnotationInstance(final ClassInfo classInfo) { - List list = classInfo.annotations().get(HANDLER_CHAIN_ANNOTATION); + List list = classInfo.annotationsMap().get(HANDLER_CHAIN_ANNOTATION); return list != null && !list.isEmpty() ? list.iterator().next() : null; } private static AnnotationInstance getEndpointInterfaceHandlerChainAnnotationInstance(final ClassInfo classInfo, final Index index) { - AnnotationValue av = classInfo.annotations().get(WEB_SERVICE_ANNOTATION).iterator().next().value("endpointInterface"); + AnnotationValue av = classInfo.annotationsMap().get(WEB_SERVICE_ANNOTATION).iterator().next().value("endpointInterface"); if (av != null) { String intf = av.asString(); if (intf != null && !intf.isEmpty()) { @@ -222,8 +222,8 @@ private static boolean isJaxwsEndpoint(final ClassInfo clazz, final Index index) if (!Modifier.isPublic(flags)) return false; if (isJaxwsService(clazz, index)) return false; if (Modifier.isFinal(flags)) return false; - final boolean isWebService = clazz.annotations().containsKey(WEB_SERVICE_ANNOTATION); - final boolean isWebServiceProvider = clazz.annotations().containsKey(WEB_SERVICE_PROVIDER_ANNOTATION); + final boolean isWebService = clazz.annotationsMap().containsKey(WEB_SERVICE_ANNOTATION); + final boolean isWebServiceProvider = clazz.annotationsMap().containsKey(WEB_SERVICE_PROVIDER_ANNOTATION); return isWebService || isWebServiceProvider; } } \ No newline at end of file diff --git a/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ASHelper.java b/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ASHelper.java index d3f373aeb928..511e06c18535 100644 --- a/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ASHelper.java +++ b/webservices/server-integration/src/main/java/org/jboss/as/webservices/util/ASHelper.java @@ -201,7 +201,7 @@ public static boolean isJaxwsEndpointInterface(final ClassInfo clazz) { final short flags = clazz.flags(); if (!Modifier.isInterface(flags)) return false; if (!Modifier.isPublic(flags)) return false; - return clazz.annotations().containsKey(WEB_SERVICE_ANNOTATION); + return clazz.annotationsMap().containsKey(WEB_SERVICE_ANNOTATION); } public static boolean hasClassesFromPackage(final Index index, final String pck) { @@ -224,8 +224,8 @@ public static boolean isJaxwsEndpoint(final ClassInfo clazz, final CompositeInde if (Modifier.isAbstract(flags)) return false; if (!Modifier.isPublic(flags)) return false; if (isJaxwsService(clazz, index)) return false; - final boolean hasWebServiceAnnotation = clazz.annotations().containsKey(WEB_SERVICE_ANNOTATION); - final boolean hasWebServiceProviderAnnotation = clazz.annotations().containsKey(WEB_SERVICE_PROVIDER_ANNOTATION); + final boolean hasWebServiceAnnotation = clazz.annotationsMap().containsKey(WEB_SERVICE_ANNOTATION); + final boolean hasWebServiceProviderAnnotation = clazz.annotationsMap().containsKey(WEB_SERVICE_PROVIDER_ANNOTATION); if (!hasWebServiceAnnotation && !hasWebServiceProviderAnnotation) { return false; } diff --git a/weld/subsystem/src/main/java/org/jboss/as/weld/deployment/processors/ExternalBeanArchiveProcessor.java b/weld/subsystem/src/main/java/org/jboss/as/weld/deployment/processors/ExternalBeanArchiveProcessor.java index ae0b2b71d71a..531e4a40ce21 100644 --- a/weld/subsystem/src/main/java/org/jboss/as/weld/deployment/processors/ExternalBeanArchiveProcessor.java +++ b/weld/subsystem/src/main/java/org/jboss/as/weld/deployment/processors/ExternalBeanArchiveProcessor.java @@ -381,7 +381,7 @@ private Set findExportedResource(Module dependencyModule, String name) { } private boolean hasBeanDefiningAnnotation(ClassInfo classInfo, Set beanDefiningAnnotations) { - Map> annotationsMap = classInfo.annotations(); + Map> annotationsMap = classInfo.annotationsMap(); for (AnnotationType beanDefiningAnnotation : beanDefiningAnnotations) { List annotations = annotationsMap.get(beanDefiningAnnotation.getName()); if (annotations != null) { diff --git a/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/AnnotationType.java b/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/AnnotationType.java index 9bb6bd178f3a..57d5af258f41 100644 --- a/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/AnnotationType.java +++ b/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/AnnotationType.java @@ -41,7 +41,7 @@ public String apply(AnnotationType input) { public static final Function FOR_CLASSINFO = new Function() { @Override public AnnotationType apply(ClassInfo clazz) { - return new AnnotationType(clazz.name(), clazz.annotations().containsKey(Indices.INHERITED_NAME)); + return new AnnotationType(clazz.name(), clazz.annotationsMap().containsKey(Indices.INHERITED_NAME)); } }; diff --git a/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileInfo.java b/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileInfo.java index a95e725d0ff0..d9a5fd231529 100644 --- a/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileInfo.java +++ b/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileInfo.java @@ -184,7 +184,7 @@ private boolean isAnnotationDeclared(ClassInfo classInfo, Class annotations = classInfo.annotations().get(requiredAnnotationName); + List annotations = classInfo.annotationsMap().get(requiredAnnotationName); if (annotations != null) { for (AnnotationInstance annotationInstance : annotations) { if (annotationInstance.target().equals(classInfo)) { @@ -196,7 +196,7 @@ private boolean isAnnotationDeclared(ClassInfo classInfo, DotName requiredAnnota } private boolean hasInjectConstructor() { - List annotationInstances = classInfo.annotations().get(DOT_NAME_INJECT); + List annotationInstances = classInfo.annotationsMap().get(DOT_NAME_INJECT); if (annotationInstances != null) { for (AnnotationInstance instance : annotationInstances) { AnnotationTarget target = instance.target(); @@ -295,11 +295,11 @@ private boolean isAssignableTo(DotName name, Class to) { private boolean containsAnnotation(ClassInfo classInfo, DotName requiredAnnotationName, Class requiredAnnotation) { // Type and members - if (classInfo.annotations().containsKey(requiredAnnotationName)) { + if (classInfo.annotationsMap().containsKey(requiredAnnotationName)) { return true; } // Meta-annotations - for (DotName annotation : classInfo.annotations().keySet()) { + for (DotName annotation : classInfo.annotationsMap().keySet()) { if (annotationClassAnnotationsCache.getValue(annotation).contains(requiredAnnotationName.toString())) { return true; } diff --git a/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileServices.java b/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileServices.java index a82254a6dc1b..051b569362fe 100644 --- a/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileServices.java +++ b/weld/subsystem/src/main/java/org/jboss/as/weld/discovery/WeldClassFileServices.java @@ -55,7 +55,7 @@ public Set apply(DotName name) { ImmutableSet.Builder builder = ImmutableSet.builder(); if (annotationClassInfo != null) { - for (DotName annotationName : annotationClassInfo.annotations().keySet()) { + for (DotName annotationName : annotationClassInfo.annotationsMap().keySet()) { builder.add(annotationName.toString()); } } else { diff --git a/xts/src/main/java/org/jboss/as/xts/XTSDependenciesDeploymentProcessor.java b/xts/src/main/java/org/jboss/as/xts/XTSDependenciesDeploymentProcessor.java index 97c38d438b22..37181ac517ad 100644 --- a/xts/src/main/java/org/jboss/as/xts/XTSDependenciesDeploymentProcessor.java +++ b/xts/src/main/java/org/jboss/as/xts/XTSDependenciesDeploymentProcessor.java @@ -99,7 +99,7 @@ private boolean isTransactionalEndpointPresent(final CompositeIndex compositeInd if (target instanceof ClassInfo) { final ClassInfo classInfo = (ClassInfo) target; - if (classInfo.annotations().get(DotName.createSimple(WebService.class.getName())) != null) { + if (classInfo.annotationsMap().get(DotName.createSimple(WebService.class.getName())) != null) { return true; } }