cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1188096 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
Date Mon, 24 Oct 2011 11:38:49 GMT
Author: sergeyb
Date: Mon Oct 24 11:38:49 2011
New Revision: 1188096

URL: http://svn.apache.org/viewvc?rev=1188096&view=rev
Log:
[CXF-3854] Appending Resource to syntesized resource names to avoid clashes with schema types
generated into the same package

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
    cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1188096&r1=1188095&r2=1188096&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
Mon Oct 24 11:38:49 2011
@@ -364,9 +364,8 @@ public class SourceGenerator {
                         resourceId += split[i].toUpperCase().charAt(0) + split[i].substring(1);
                     }
                 }
-            } else {
-                resourceId = DEFAULT_RESOURCE_NAME;    
             }
+            resourceId += DEFAULT_RESOURCE_NAME;    
         }
         
         boolean expandedQName = resourceId.startsWith("{") ? true : false;

Modified: cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java?rev=1188096&r1=1188095&r2=1188096&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
(original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
Mon Oct 24 11:38:49 2011
@@ -187,7 +187,7 @@ public class JAXRSContainerTest extends 
             
             List<File> files = FileUtils.getFilesRecurse(output, ".+\\." + "class"
+ "$");
             assertEquals(4, files.size());
-            assertTrue(checkContains(files, "application" + ".Bookstore.class"));
+            assertTrue(checkContains(files, "application" + ".BookstoreResource.class"));
             assertTrue(checkContains(files, "superbooks" + ".Book.class"));
             assertTrue(checkContains(files, "superbooks" + ".ObjectFactory.class"));
             assertTrue(checkContains(files, "superbooks" + ".package-info.class"));
@@ -318,12 +318,12 @@ public class JAXRSContainerTest extends 
             
             List<File> javaFiles = FileUtils.getFilesRecurse(output, ".+\\." + "java"
+ "$");
             assertEquals(2, javaFiles.size());
-            assertTrue(checkContains(javaFiles, "application.Bookstore.java"));
-            assertTrue(checkContains(javaFiles, "application.Books.java"));
+            assertTrue(checkContains(javaFiles, "application.BookstoreResource.java"));
+            assertTrue(checkContains(javaFiles, "application.BooksResource.java"));
             List<File> classFiles = FileUtils.getFilesRecurse(output, ".+\\." + "class"
+ "$");
             assertEquals(2, classFiles.size());
-            assertTrue(checkContains(classFiles, "application.Bookstore.class"));
-            assertTrue(checkContains(classFiles, "application.Books.class"));
+            assertTrue(checkContains(classFiles, "application.BookstoreResource.class"));
+            assertTrue(checkContains(classFiles, "application.BooksResource.class"));
         } catch (Exception e) {
             e.printStackTrace();
             fail();



Mime
View raw message