cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject cxf-dosgi git commit: [DOSGI-267] Treat all intents annotated with @Provider as providers
Date Thu, 13 Jul 2017 11:46:35 GMT
Repository: cxf-dosgi
Updated Branches:
  refs/heads/master 88b51ef4c -> bf243bd12


[DOSGI-267] Treat all intents annotated with @Provider as providers


Project: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/commit/bf243bd1
Tree: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/tree/bf243bd1
Diff: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/diff/bf243bd1

Branch: refs/heads/master
Commit: bf243bd129d1191c9ba325d5a163d3d29707461f
Parents: 88b51ef
Author: Richard Begg <richard.begg@identity-solutions.com.au>
Authored: Thu Jul 13 13:38:20 2017 +1000
Committer: Richard Begg <richard.begg@identity-solutions.com.au>
Committed: Thu Jul 13 13:38:20 2017 +1000

----------------------------------------------------------------------
 .../java/org/apache/cxf/dosgi/dsw/handlers/rest/RsProvider.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/bf243bd1/provider-rs/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/RsProvider.java
----------------------------------------------------------------------
diff --git a/provider-rs/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/RsProvider.java
b/provider-rs/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/RsProvider.java
index 975c97f..160f185 100644
--- a/provider-rs/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/RsProvider.java
+++ b/provider-rs/src/main/java/org/apache/cxf/dosgi/dsw/handlers/rest/RsProvider.java
@@ -32,6 +32,7 @@ import javax.ws.rs.ext.ContextResolver;
 import javax.ws.rs.ext.ExceptionMapper;
 import javax.ws.rs.ext.MessageBodyReader;
 import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
 
 import org.apache.aries.rsa.spi.DistributionProvider;
 import org.apache.aries.rsa.spi.Endpoint;
@@ -173,7 +174,8 @@ public class RsProvider extends BaseDistributionProvider implements Distribution
     }
     
     private boolean isProvider(Object intent) {
-        return (intent instanceof ExceptionMapper) // 
+        return intent.getClass().getAnnotation(Provider.class) != null //
+            || (intent instanceof ExceptionMapper) // 
             || (intent instanceof MessageBodyReader) //
             || (intent instanceof MessageBodyWriter) //
             || (intent instanceof ContextResolver) //


Mime
View raw message