[jboss-cvs] JBossAS SVN: r101752 - projects/vfs/trunk/src/main/java/org/jboss/vfs.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 3 01:04:34 EST 2010


Author: david.lloyd at jboss.com
Date: 2010-03-03 01:04:34 -0500 (Wed, 03 Mar 2010)
New Revision: 101752

Modified:
   projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java
Log:
Add identity equals shortcut

Modified: projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java	2010-03-03 06:02:56 UTC (rev 101751)
+++ projects/vfs/trunk/src/main/java/org/jboss/vfs/VirtualFile.java	2010-03-03 06:04:34 UTC (rev 101752)
@@ -504,7 +504,10 @@
      * @return {@code true} if they are equal
      */
     public boolean equals(VirtualFile o) {
-        if (o != this || o == null || hashCode != o.hashCode || ! name.equals(o.name)) {
+        if (o == this) {
+            return true;
+        }
+        if (o == null || hashCode != o.hashCode || ! name.equals(o.name)) {
             return false;
         }
         final VirtualFile parent = this.parent;




More information about the jboss-cvs-commits mailing list