You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2021/05/02 04:39:29 UTC
[tomee] branch master updated: Rework TOMEE-3176
jaxrs.spec.filter.globalbinding globalBoundResourceTest
This is an automated email from the ASF dual-hosted git repository.
dblevins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/master by this push:
new 3ee82e4 Rework TOMEE-3176 jaxrs.spec.filter.globalbinding globalBoundResourceTest
3ee82e4 is described below
commit 3ee82e4a6bac605df683d6f0b6192be3b333bd41
Author: David Blevins <da...@gmail.com>
AuthorDate: Sat May 1 21:39:11 2021 -0700
Rework TOMEE-3176 jaxrs.spec.filter.globalbinding globalBoundResourceTest
---
.../org/apache/openejb/server/rest/RESTService.java | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java b/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java
index a2caa10..360a9a4 100644
--- a/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java
+++ b/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java
@@ -337,20 +337,11 @@ public abstract class RESTService implements ServerService, SelfManaging {
}
private static boolean hasBindings(final Class<?> clazz) {
- final Set<Class<?>> classes = new HashSet<Class<?>>();
-
- if (!classes.add(clazz)) return false;
-
- return hasBindings(clazz, classes);
- }
-
- private static boolean hasBindings(final Class<?> clazz, final Set<Class<?>> classes) {
for (final Annotation annotation : clazz.getAnnotations()) {
- if (javax.ws.rs.NameBinding.class == annotation.annotationType()) {
- return true;
- }
- if (hasBindings(annotation.annotationType(), classes)) {
- return true;
+ for (final Annotation metaAnnotation : annotation.annotationType().getAnnotations()) {
+ if (javax.ws.rs.NameBinding.class == metaAnnotation.annotationType()) {
+ return true;
+ }
}
}
return false;