Skip to content

Commit 929c596

Browse files
committed
AnnotationJmxAttributeSource uses AnnotationUtils for consistent meta-annotation handling and diagnostics
Issue: SPR-12572 (cherry picked from commit d4a5059)
1 parent 9362d0d commit 929c596

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-context/src/main/java/org/springframework/jmx/export/annotation/AnnotationJmxAttributeSource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -70,7 +70,7 @@ public String resolveStringValue(String strVal) {
7070
@Override
7171
public ManagedResource getManagedResource(Class<?> beanClass) throws InvalidMetadataException {
7272
org.springframework.jmx.export.annotation.ManagedResource ann =
73-
beanClass.getAnnotation(org.springframework.jmx.export.annotation.ManagedResource.class);
73+
AnnotationUtils.getAnnotation(beanClass, org.springframework.jmx.export.annotation.ManagedResource.class);
7474
if (ann == null) {
7575
return null;
7676
}
@@ -148,7 +148,7 @@ public ManagedOperationParameter[] getManagedOperationParameters(Method method)
148148

149149
@Override
150150
public ManagedNotification[] getManagedNotifications(Class<?> clazz) throws InvalidMetadataException {
151-
ManagedNotifications notificationsAnn = clazz.getAnnotation(ManagedNotifications.class);
151+
ManagedNotifications notificationsAnn = AnnotationUtils.getAnnotation(clazz, ManagedNotifications.class);
152152
if (notificationsAnn == null) {
153153
return new ManagedNotification[0];
154154
}

0 commit comments

Comments
 (0)