[Spread-users] [PATCH] SpreadGroup.equals() minor improvement

Daniel Rall dlr at finemaltcoding.com
Fri Jul 27 16:28:20 EDT 2001


Here's a section of code in SpreadGroup's equals() method that could
be less complicated:

--- SpreadGroup.java-ORIG       Fri Jul 27 13:24:23 2001
+++ SpreadGroup.java    Fri Jul 27 13:24:43 2001
@@ -228,13 +228,6 @@
                // Check if the names are the same.
                ///////////////////////////////////
                SpreadGroup other = (SpreadGroup)object;
-               if(other.toString().equals(this.toString()) == false)
-               {
-                       return false;
-               }
-
-               // No differences, the groups are the same.
-               ///////////////////////////////////////////
-               return true;
+               return (other.toString().equals(this.toString()));
        }
 }





More information about the Spread-users mailing list