directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r491678 - /directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
Date Mon, 01 Jan 2007 23:08:48 GMT
Author: elecharny
Date: Mon Jan  1 15:08:47 2007
New Revision: 491678

URL: http://svn.apache.org/viewvc?view=rev&rev=491678
Log:
Moved a test to clarify the code

Modified:
    directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java

Modified: directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java?view=diff&rev=491678&r1=491677&r2=491678
==============================================================================
--- directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
(original)
+++ directory/trunks/shared/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
Mon Jan  1 15:08:47 2007
@@ -633,15 +633,15 @@
     */
    public int compareTo( Object object )
    {
+       if ( object == null )
+       {
+           return SUPERIOR;
+       }
+
        if ( object instanceof Rdn )
        {
            Rdn rdn = ( Rdn ) object;
 
-           if ( rdn == null )
-           {
-               return SUPERIOR;
-           }
-
            if ( rdn.nbAtavs != nbAtavs )
            {
                // We don't have the same number of ATAVs. The Rdn which
@@ -728,7 +728,7 @@
        }
        else
        {
-           return object != null ? UNDEFINED : SUPERIOR;
+           return UNDEFINED;
        }
    }
 



Mime
View raw message