[exo-jcr-commits] exo-jcr SVN: r5348 - in kernel/trunk: exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/io and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Dec 23 10:32:42 EST 2011


Author: andrew.plotnikov
Date: 2011-12-23 10:32:41 -0500 (Fri, 23 Dec 2011)
New Revision: 5348

Modified:
   kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoExpression.java
   kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ISO8601.java
   kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/io/ZipUtil.java
   kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/compress/CompressData.java
   kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ObjectParam.java
Log:
EXOJCR-1687: Fixed new sonar violations in project

Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoExpression.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoExpression.java	2011-12-23 13:38:34 UTC (rev 5347)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ExoExpression.java	2011-12-23 15:32:41 UTC (rev 5348)
@@ -244,23 +244,23 @@
          return new ByteArrayInputStream(baos.toByteArray());
       for (File f : list)
       {
-         StringBuffer filePath = new StringBuffer(f.getAbsolutePath());
+         StringBuilder filePath = new StringBuilder(f.getAbsolutePath());
 
          if (f.getAbsolutePath().startsWith(path))
          {
             if (containParent && input.isDirectory())
             {
-               filePath = new StringBuffer(input.getName());
+               filePath = new StringBuilder(input.getName());
                filePath.append(File.separator);
                filePath.append(f.getAbsolutePath().substring(path.length() + 1));
             }
             else if (input.isDirectory())
             {
-               filePath = new StringBuffer(f.getAbsolutePath().substring(path.length() + 1));
+               filePath = new StringBuilder(f.getAbsolutePath().substring(path.length() + 1));
             }
             else
             {
-               filePath = new StringBuffer(input.getName());
+               filePath = new StringBuilder(input.getName());
             }
          }
 

Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ISO8601.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ISO8601.java	2011-12-23 13:38:34 UTC (rev 5347)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/ISO8601.java	2011-12-23 15:32:41 UTC (rev 5348)
@@ -263,7 +263,7 @@
     */
    public static Calendar parse(String dateString, String[] formats) throws ParseException
    {
-      StringBuffer problems = new StringBuffer();
+      StringBuilder problems = new StringBuilder();
 
       int errOffset = 0;
       for (String format : formats)

Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/io/ZipUtil.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/io/ZipUtil.java	2011-12-23 13:38:34 UTC (rev 5347)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/io/ZipUtil.java	2011-12-23 15:32:41 UTC (rev 5348)
@@ -72,23 +72,23 @@
          return zipOutput;
       for (File f : list)
       {
-         StringBuffer filePath = new StringBuffer(f.getAbsolutePath());
+         StringBuilder filePath = new StringBuilder(f.getAbsolutePath());
 
          if (f.getAbsolutePath().startsWith(path))
          {
             if (containParent && input.isDirectory())
             {
-               filePath = new StringBuffer(input.getName());
+               filePath = new StringBuilder(input.getName());
                filePath.append(File.separator);
                filePath.append(f.getAbsolutePath().substring(path.length() + 1));
             }
             else if (input.isDirectory())
             {
-               filePath = new StringBuffer(f.getAbsolutePath().substring(path.length() + 1));
+               filePath = new StringBuilder(f.getAbsolutePath().substring(path.length() + 1));
             }
             else
             {
-               filePath = new StringBuffer(input.getName());
+               filePath = new StringBuilder(input.getName());
             }
          }
 

Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/compress/CompressData.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/compress/CompressData.java	2011-12-23 13:38:34 UTC (rev 5347)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/compress/CompressData.java	2011-12-23 15:32:41 UTC (rev 5348)
@@ -354,23 +354,23 @@
             throw new Exception("nothing in the list");
          for (File f : list)
          {
-            StringBuffer filePath = new StringBuffer(f.getAbsolutePath());
+            StringBuilder filePath = new StringBuilder(f.getAbsolutePath());
 
             if (f.getAbsolutePath().startsWith(path))
             {
                if (containParent && file_.isDirectory())
                {
-                  filePath = new StringBuffer(file_.getName());
+                  filePath = new StringBuilder(file_.getName());
                   filePath.append(File.separator);
                   filePath.append(f.getAbsolutePath().substring(path.length() + 1));
                }
                else if (file_.isDirectory())
                {
-                  filePath = new StringBuffer(f.getAbsolutePath().substring(path.length() + 1));
+                  filePath = new StringBuilder(f.getAbsolutePath().substring(path.length() + 1));
                }
                else
                {
-                  filePath = new StringBuffer(file_.getName());
+                  filePath = new StringBuilder(file_.getName());
                }
             }
 
@@ -452,23 +452,23 @@
             throw new Exception("nothing in the list");
          for (File f : list)
          {
-            StringBuffer filePath = new StringBuffer(f.getAbsolutePath());
+            StringBuilder filePath = new StringBuilder(f.getAbsolutePath());
 
             if (f.getAbsolutePath().startsWith(path))
             {
                if (containParent && file_.isDirectory())
                {
-                  filePath = new StringBuffer(file_.getName());
+                  filePath = new StringBuilder(file_.getName());
                   filePath.append(File.separator);
                   filePath.append(f.getAbsolutePath().substring(path.length() + 1));
                }
                else if (file_.isDirectory())
                {
-                  filePath = new StringBuffer(f.getAbsolutePath().substring(path.length() + 1));
+                  filePath = new StringBuilder(f.getAbsolutePath().substring(path.length() + 1));
                }
                else
                {
-                  filePath = new StringBuffer(file_.getName());
+                  filePath = new StringBuilder(file_.getName());
                }
             }
 
@@ -484,7 +484,6 @@
             addToArchive(zos, bufInput, filePath.toString());
          }
       }
-
    }
 
    public static class InputStreamDataInstance extends DataInstance

Modified: kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ObjectParam.java
===================================================================
--- kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ObjectParam.java	2011-12-23 13:38:34 UTC (rev 5347)
+++ kernel/trunk/exo.kernel.container/src/main/java/org/exoplatform/container/xml/ObjectParam.java	2011-12-23 15:32:41 UTC (rev 5348)
@@ -152,7 +152,7 @@
 
          if (className.indexOf(".") < 0)
          {
-            StringBuffer fullName = new StringBuffer();
+            StringBuilder fullName = new StringBuilder();
             fullName.append(package_);
             fullName.append(".");
             fullName.append(className);



More information about the exo-jcr-commits mailing list