You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/11/16 18:26:34 UTC

svn commit: r595747 - in /incubator/cxf/branches/2.0.x-fixes: common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaClass.java

Author: dkulp
Date: Fri Nov 16 09:26:33 2007
New Revision: 595747

URL: http://svn.apache.org/viewvc?rev=595747&view=rev
Log:
Fix build failure

Modified:
    incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
    incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaClass.java

Modified: incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java?rev=595747&r1=595746&r2=595747&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java Fri Nov 16 09:26:33 2007
@@ -208,4 +208,18 @@
         }                
         return urlString;
     }
+ 
+    /**
+     * Return input string with first character in upper case.
+     * @param name input string.
+     * @return capitalized form.
+     */
+    public static String capitalize(String name) {
+        if (name == null || name.length() == 0) {
+            return name;
+        }
+        char chars[] = name.toCharArray();
+        chars[0] = Character.toUpperCase(chars[0]);
+        return new String(chars);
+    }
 }

Modified: incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaClass.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaClass.java?rev=595747&r1=595746&r2=595747&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaClass.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaClass.java Fri Nov 16 09:26:33 2007
@@ -22,7 +22,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.cxf.tools.util.AnnotationUtil;
+import org.apache.cxf.common.util.StringUtils;
 
 public class JavaClass extends JavaInterface {
     
@@ -83,7 +83,7 @@
     }
 
     private String getSetterParamName(String fieldName) {
-        return "new" + AnnotationUtil.capitalize(fieldName);
+        return "new" + StringUtils.capitalize(fieldName);
     }
     
 }