[Libreoffice-commits] .: accessibility/workben qadevOOo/runner

Julien Nabet serval2412 at kemper.freedesktop.org
Sun Aug 14 08:56:17 PDT 2011


 accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java |    8 ++++----
 qadevOOo/runner/lib/MultiMethodTest.java                                      |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 6e59262f22b114fd6b101bbaaf9411bc889cd621
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Aug 14 17:55:24 2011 +0200

    Some PMD cleaning

diff --git a/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java
index 44638b0..1820f4e 100644
--- a/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java
+++ b/accessibility/workben/org/openoffice/accessibility/awb/view/StateSetView.java
@@ -174,17 +174,17 @@ public class StateSetView
             }
 
             // Draw string of set states.
-            String sStates = new String ();
+            StringBuffer sStates = new StringBuffer ();
             for (int i=0; i<aStates.length; i++)
             {
                 if (i > 0)
-                    sStates = sStates + ", ";
-                sStates = sStates + NameProvider.getStateName(aStates[i]);
+                    sStates.append(", ");
+                sStates.append(NameProvider.getStateName(aStates[i]));
             }
             g.setTransform (aTransform);
             g.translate (10,aWidgetArea.y+aWidgetArea.height-3);
             g.scale (0.9,0.9);
-            g.drawString (sStates,0,0);
+            g.drawString (sStates.toString(),0,0);
         }
     }
 
diff --git a/qadevOOo/runner/lib/MultiMethodTest.java b/qadevOOo/runner/lib/MultiMethodTest.java
index 884059b..901f499 100644
--- a/qadevOOo/runner/lib/MultiMethodTest.java
+++ b/qadevOOo/runner/lib/MultiMethodTest.java
@@ -161,7 +161,7 @@ public class MultiMethodTest
 
         // Some fake code for a self test.
         // For normal test we must not be a "ifc.qadevooo._SelfTest"
-        if (! entry.entryName.equals("ifc.qadevooo._SelfTest"))
+        if (! ("ifc.qadevooo._SelfTest").equals(entry.entryName))
         {
             String ifcName = getInterfaceName();
             // System.out.println("checking : " + ifcName);
@@ -276,8 +276,8 @@ public class MultiMethodTest
     {
         String clsName = this.getClass().getName();
 
-        int firstDot = clsName.indexOf(".");
-        int lastDot = clsName.lastIndexOf(".");
+        int firstDot = clsName.indexOf('.');
+        int lastDot = clsName.lastIndexOf('.');
 
         String append = "com.sun.star.";
 


More information about the Libreoffice-commits mailing list