This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-jax-rs-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 9f7d741  [ARIES-2002] better IT test for unproxying, thanks csierra 
for the catch
9f7d741 is described below

commit 9f7d741c5293898527fa25abdbd062beccfe5148
Author: Romain Manni-Bucau <rmannibu...@gmail.com>
AuthorDate: Tue Sep 22 18:34:13 2020 +0200

    [ARIES-2002] better IT test for unproxying, thanks csierra for the catch
---
 jax-rs.itests/src/main/java/test/JaxrsTest.java            |  2 +-
 .../java/test/types/TestApplicationWithSingletons.java     | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/jax-rs.itests/src/main/java/test/JaxrsTest.java 
b/jax-rs.itests/src/main/java/test/JaxrsTest.java
index 26fc4ef..5f8ef66 100644
--- a/jax-rs.itests/src/main/java/test/JaxrsTest.java
+++ b/jax-rs.itests/src/main/java/test/JaxrsTest.java
@@ -153,7 +153,7 @@ public class JaxrsTest extends TestHelper {
         assertArrayEquals(
             new String[]{MediaType.TEXT_PLAIN},
             resourceMethod.producingMimeType);
-        assertNull(resourceMethod.nameBindings);
+        assertArrayEquals(new 
String[]{TestApplicationWithSingletons.Bind.class.getName()}, 
resourceMethod.nameBindings);
     }
 
     @Test
diff --git 
a/jax-rs.itests/src/main/java/test/types/TestApplicationWithSingletons.java 
b/jax-rs.itests/src/main/java/test/types/TestApplicationWithSingletons.java
index 0fd34cf..4ff9ba0 100644
--- a/jax-rs.itests/src/main/java/test/types/TestApplicationWithSingletons.java
+++ b/jax-rs.itests/src/main/java/test/types/TestApplicationWithSingletons.java
@@ -18,12 +18,19 @@
 package test.types;
 
 import javax.ws.rs.GET;
+import javax.ws.rs.NameBinding;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Application;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
 import java.util.Collections;
 import java.util.Set;
 
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
 public class TestApplicationWithSingletons extends Application {
 
     @Override
@@ -31,6 +38,7 @@ public class TestApplicationWithSingletons extends 
Application {
         return Collections.<Object>singleton(new MyResource$$Proxy());
     }
 
+    @Bind
     @Path("my")
     @Produces("text/plain")
     public static class MyResource {
@@ -40,6 +48,12 @@ public class TestApplicationWithSingletons extends 
Application {
         }
     }
 
+    @NameBinding
+    @Retention(RUNTIME)
+    @Target({TYPE, METHOD})
+    public @interface Bind {
+    }
+
     public static class MyResource$$Proxy extends MyResource {
     }
 }

Reply via email to