Revision: 693
Author: allain.lalonde
Date: Fri Oct  9 08:29:14 2009
Log: Fixing PMD Bug in setText of PText
http://code.google.com/p/piccolo2d/source/detail?r=693

Modified:
   
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java

=======================================
---  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java    
 
Fri Oct  9 08:10:29 2009
+++  
/piccolo2d.java/trunk/core/src/main/java/edu/umd/cs/piccolo/nodes/PText.java    
 
Fri Oct  9 08:29:14 2009
@@ -351,19 +351,19 @@
       * This is a <b>bound</b> property.
       * </p>
       *
-     * @param text text for this text node
+     * @param newText text for this text node
       */
-    public void setText(final String text) {
-        if ((text == null && this.text == null) || (text != null &&  
text.equals(this.text))) {
+    public void setText(final String newText) {
+        if (newText == null && text == null || newText != null &&  
newText.equals(text)) {
              return;
          }

-        final String oldText = this.text;
-        this.text = text == null ? DEFAULT_TEXT : text;
+        final String oldText = text;
+        text = newText == null ? DEFAULT_TEXT : newText;
          lines = null;
          recomputeLayout();
          invalidatePaint();
-        firePropertyChange(PROPERTY_CODE_TEXT, PROPERTY_TEXT, oldText,  
this.text);
+        firePropertyChange(PROPERTY_CODE_TEXT, PROPERTY_TEXT, oldText,  
text);
      }

      /**

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to