svn commit: r763509 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r763509 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java

jacopoc
Author: jacopoc
Date: Thu Apr  9 04:06:48 2009
New Revision: 763509

URL: http://svn.apache.org/viewvc?rev=763509&view=rev
Log:
The util method quoteStrList was adding two times the trailing ' to the elements. Formatting fixes.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=763509&r1=763508&r2=763509&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java Thu Apr  9 04:06:48 2009
@@ -190,7 +190,7 @@
 
         list = FastList.newInstance();
         for (String str: tmpList) {
-            str = "'" + str + "''";
+            str = "'" + str + "'";
             list.add(str);
         }
         return list;
@@ -460,10 +460,9 @@
      * @return the new value
      */
     public static String addToNumberString(String numberString, long addAmount) {
-    if (numberString == null) return null;
-
-    int origLength = numberString.length();
-    long number = Long.parseLong(numberString);
+        if (numberString == null) return null;
+        int origLength = numberString.length();
+        long number = Long.parseLong(numberString);
         return padNumberString(Long.toString(number + addAmount), origLength);
     }