cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cxf git commit: CXF-6132: Provide JAX-RS ServletContextInitializer. Minor fixes.
Date Tue, 10 Feb 2015 00:01:25 GMT
Repository: cxf
Updated Branches:
  refs/heads/master ef34e4ec5 -> 95c3d8991


CXF-6132: Provide JAX-RS ServletContextInitializer. Minor fixes.


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

Branch: refs/heads/master
Commit: 95c3d899174e39263a773e89a22efbd40be77d4b
Parents: ef34e4e
Author: reta <drreta@gmail.com>
Authored: Mon Feb 9 19:01:09 2015 -0500
Committer: reta <drreta@gmail.com>
Committed: Mon Feb 9 19:01:09 2015 -0500

----------------------------------------------------------------------
 .../JaxrsServletContainerInitializer.java       | 22 ++++++++++++--------
 systests/rs-http-sci/pom.xml                    | 13 +-----------
 2 files changed, 14 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/95c3d899/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
----------------------------------------------------------------------
diff --git a/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
b/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
index c872926..18473f2 100644
--- a/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
+++ b/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
@@ -161,11 +161,13 @@ public class JaxrsServletContainerInitializer implements ServletContainerInitial
         grouped.put(Provider.class, new ArrayList< Class< ? > >());
         grouped.put(Path.class, new ArrayList< Class< ? > >());
         
-        for (final Class< ? > clazz: classes) {
-            if (!classShouldBeIgnored(clazz)) {
-                for (final Class< ? extends Annotation > annotation: grouped.keySet())
{
-                    if (clazz.isAnnotationPresent(annotation)) {
-                        grouped.get(annotation).add(clazz);
+        if (classes != null) {
+            for (final Class< ? > clazz: classes) {
+                if (!classShouldBeIgnored(clazz)) {
+                    for (final Class< ? extends Annotation > annotation: grouped.keySet())
{
+                        if (clazz.isAnnotationPresent(annotation)) {
+                            grouped.get(annotation).add(clazz);
+                        }
                     }
                 }
             }
@@ -179,10 +181,12 @@ public class JaxrsServletContainerInitializer implements ServletContainerInitial
     }
 
     private static Class< ? > findCandidate(final Set< Class< ? > > classes)
{
-        for (final Class< ? > clazz: classes) {
-            if (Application.class.isAssignableFrom(clazz) && !classShouldBeIgnored(clazz))
{
-                LOG.fine("Found JAX-RS application to initialize: " + clazz.getName());
-                return clazz;
+        if (classes != null) {
+            for (final Class< ? > clazz: classes) {
+                if (Application.class.isAssignableFrom(clazz) && !classShouldBeIgnored(clazz))
{
+                    LOG.fine("Found JAX-RS application to initialize: " + clazz.getName());
+                    return clazz;
+                }
             }
         }
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/95c3d899/systests/rs-http-sci/pom.xml
----------------------------------------------------------------------
diff --git a/systests/rs-http-sci/pom.xml b/systests/rs-http-sci/pom.xml
index 7a7fe5d..bda57ed 100644
--- a/systests/rs-http-sci/pom.xml
+++ b/systests/rs-http-sci/pom.xml
@@ -33,7 +33,6 @@
     <properties>
         <cxf.surefire.fork.vmargs>-XX:MaxPermSize=192m</cxf.surefire.fork.vmargs>
         <cxf.server.launcher.vmargs>-XX:MaxPermSize=192m</cxf.server.launcher.vmargs>
-        <cxf.tomcat.version>7.0.52</cxf.tomcat.version>
         <cxf.jetty.version>${cxf.jetty9.version}</cxf.jetty.version>
     </properties>
     <dependencies>
@@ -115,17 +114,7 @@
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
             <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tomcat.embed</groupId>
-            <artifactId>tomcat-embed-core</artifactId>
-            <version>${cxf.tomcat.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.tomcat.embed</groupId>
-            <artifactId>tomcat-embed-logging-juli</artifactId>
-            <version>${cxf.tomcat.version}</version>
-        </dependency>        
+        </dependency>              
         <dependency>
             <groupId>com.ning</groupId>
             <artifactId>async-http-client</artifactId>


Mime
View raw message