cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r811387 - in /cxf/trunk: testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java tools/common/src/main/java/org/apache/cxf/tools/common/model/JAnnotationElement.java
Date Fri, 04 Sep 2009 13:27:03 GMT
Author: dkulp
Date: Fri Sep  4 13:27:03 2009
New Revision: 811387

URL: http://svn.apache.org/viewvc?rev=811387&view=rev
Log:
[CXF-2416] Remove compiler warning from generated code for annotations
using enums

Modified:
    cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JAnnotationElement.java

Modified: cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java?rev=811387&r1=811386&r2=811387&view=diff
==============================================================================
--- cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java (original)
+++ cxf/trunk/testutils/src/main/java/org/apache/locator_test/LocatorServiceImpl.java Fri
Sep  4 13:27:03 2009
@@ -84,8 +84,7 @@
     }
 
     
-    public java.util.List<
-        Endpoint> listEndpoints() {
+    public List<Endpoint> listEndpoints() {
         LOG.info("Executing operation listEndpoints");
         return new ArrayList<Endpoint>();
     }

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JAnnotationElement.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JAnnotationElement.java?rev=811387&r1=811386&r2=811387&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JAnnotationElement.java
(original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JAnnotationElement.java
Fri Sep  4 13:27:03 2009
@@ -123,9 +123,11 @@
         Enum e = (Enum) obj;
 
         String clzName = e.getClass().getName();
-        
-        imports.add(obj.getClass().getName().replace("$", "."));
-
+        if (clzName.contains("$")) {
+            imports.add(obj.getClass().getName().substring(0, clzName.lastIndexOf("$")));
+        } else {
+            imports.add(obj.getClass().getName());
+        }
         sb.append(clzName.substring(clzName.lastIndexOf(".") + 1).replace("$", "."));
         sb.append(".");
         sb.append(e.name());



Mime
View raw message