directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1062861 - in /directory/shared/trunk: all/ asn1-api/ asn1-ber/ ldap/src/main/java/org/apache/directory/shared/ldap/message/ ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/ ldap/src/main/java/org/apache/directory/share...
Date Mon, 24 Jan 2011 16:32:37 GMT
Author: elecharny
Date: Mon Jan 24 16:32:36 2011
New Revision: 1062861

URL: http://svn.apache.org/viewvc?rev=1062861&view=rev
Log:
Fixed some warnings Intelij IDE analysis reported

Modified:
    directory/shared/trunk/all/   (props changed)
    directory/shared/trunk/asn1-api/   (props changed)
    directory/shared/trunk/asn1-ber/   (props changed)
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractResultResponse.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultDoneImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultReferenceImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/LdapURL.java
    directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java

Propchange: directory/shared/trunk/all/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jan 24 16:32:36 2011
@@ -6,5 +6,7 @@ eclipse-classes
 *.log
 *.iml
 *.ipr
+.idea
+*.iws
 dependency-reduced-pom.xml
 META-INF

Propchange: directory/shared/trunk/asn1-api/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jan 24 16:32:36 2011
@@ -6,5 +6,7 @@ eclipse-classes
 *.log
 *.iml
 *.ipr
+.idea
+*.iml
 dependency-reduced-pom.xml
 META-INF

Propchange: directory/shared/trunk/asn1-ber/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Jan 24 16:32:36 2011
@@ -6,5 +6,7 @@ eclipse-classes
 *.log
 *.iml
 *.ipr
+.idea
+*.iws
 dependency-reduced-pom.xml
 META-INF

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequestImpl.java
Mon Jan 24 16:32:36 2011
@@ -108,12 +108,7 @@ public class AbandonRequestImpl extends 
 
         AbandonRequest req = ( AbandonRequest ) obj;
 
-        if ( req.getAbandoned() != abandonId )
-        {
-            return false;
-        }
-
-        return true;
+        return req.getAbandoned() == abandonId;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractResultResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractResultResponse.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractResultResponse.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractResultResponse.java
Mon Jan 24 16:32:36 2011
@@ -20,9 +20,9 @@
 package org.apache.directory.shared.ldap.message;
 
 
+import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.LdapResult;
 import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
-import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.ResultResponse;
 
 
@@ -127,12 +127,7 @@ public abstract class AbstractResultResp
             return false;
         }
 
-        if ( ( ldapResult != null ) && ( resp.getLdapResult() != null ) &&
!ldapResult.equals( resp.getLdapResult() ) )
-        {
-            return false;
-        }
-
-        return true;
+        return ( ( ldapResult == null ) || ( resp.getLdapResult() == null ) || ldapResult.equals(
resp.getLdapResult() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
Mon Jan 24 16:32:36 2011
@@ -400,12 +400,7 @@ public class BindRequestImpl extends Abs
 
         }
 
-        if ( !Arrays.equals( req.getCredentials(), getCredentials() ) )
-        {
-            return false;
-        }
-
-        return true;
+        return Arrays.equals( req.getCredentials(), getCredentials() );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
Mon Jan 24 16:32:36 2011
@@ -239,13 +239,8 @@ public class ExtendedRequestImpl extends
             return false;
         }
 
-        if ( ( requestValue != null ) && ( req.getRequestValue() != null )
-            && !Arrays.equals( requestValue, req.getRequestValue() ) )
-        {
-            return false;
-        }
-
-        return true;
+        return ( ( requestValue == null ) || ( req.getRequestValue() == null )
+            || Arrays.equals( requestValue, req.getRequestValue() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
Mon Jan 24 16:32:36 2011
@@ -220,13 +220,8 @@ public class ExtendedResponseImpl extend
             return false;
         }
 
-        if ( ( responseValue != null ) && ( resp.getResponseValue() != null )
-            && !Arrays.equals( responseValue, resp.getResponseValue() ) )
-        {
-            return false;
-        }
-
-        return true;
+        return ( ( responseValue == null ) || ( resp.getResponseValue() == null )
+            || Arrays.equals( responseValue, resp.getResponseValue() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java
Mon Jan 24 16:32:36 2011
@@ -216,13 +216,8 @@ public class IntermediateResponseImpl ex
             return false;
         }
 
-        if ( ( responseValue != null ) && ( resp.getResponseValue() != null )
-            && !Arrays.equals( responseValue, resp.getResponseValue() ) )
-        {
-            return false;
-        }
-
-        return true;
+        return ( ( responseValue == null ) || ( resp.getResponseValue() == null )
+            || Arrays.equals( responseValue, resp.getResponseValue() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
Mon Jan 24 16:32:36 2011
@@ -348,12 +348,7 @@ public class ModifyDnRequestImpl extends
             return false;
         }
 
-        if ( newSuperior != null && req.getNewSuperior() != null && !newSuperior.equals(
req.getNewSuperior() ) )
-        {
-            return false;
-        }
-
-        return true;
+        return ( ( newSuperior == null ) || ( req.getNewSuperior() == null ) || newSuperior.equals(
req.getNewSuperior() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultDoneImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultDoneImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultDoneImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultDoneImpl.java
Mon Jan 24 16:32:36 2011
@@ -99,12 +99,7 @@ public class SearchResultDoneImpl extend
 
         LdapResult result = ( ( SearchResultDone ) obj ).getLdapResult();
 
-        if ( !getLdapResult().equals( result ) )
-        {
-            return false;
-        }
-
-        return true;
+        return getLdapResult().equals( result );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultReferenceImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultReferenceImpl.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultReferenceImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResultReferenceImpl.java
Mon Jan 24 16:32:36 2011
@@ -162,12 +162,7 @@ public class SearchResultReferenceImpl e
             return false;
         }
 
-        if ( this.referral != null && resp.getReferral() != null && !this.referral.equals(
resp.getReferral() ) )
-        {
-            return false;
-        }
-
-        return true;
+        return ( this.referral == null || resp.getReferral() == null || this.referral.equals(
resp.getReferral() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java
Mon Jan 24 16:32:36 2011
@@ -126,11 +126,6 @@ public class CancelResponse extends Exte
             return true;
         }
 
-        if ( obj instanceof CancelResponse )
-        {
-            return true;
-        }
-
-        return false;
+        return ( obj instanceof CancelResponse );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java
Mon Jan 24 16:32:36 2011
@@ -147,11 +147,6 @@ public class CertGenerationResponse exte
             return true;
         }
 
-        if ( obj instanceof CertGenerationResponse )
-        {
-            return true;
-        }
-
-        return false;
+        return ( obj instanceof CertGenerationResponse );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
Mon Jan 24 16:32:36 2011
@@ -165,11 +165,6 @@ public class GracefulShutdownResponse ex
             return true;
         }
 
-        if ( obj instanceof GracefulShutdownResponse )
-        {
-            return true;
-        }
-
-        return false;
+        return ( obj instanceof GracefulShutdownResponse );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
Mon Jan 24 16:32:36 2011
@@ -150,11 +150,6 @@ public class LaunchDiagnosticUiResponse 
             return true;
         }
 
-        if ( obj instanceof LaunchDiagnosticUiResponse )
-        {
-            return true;
-        }
-
-        return false;
+        return ( obj instanceof LaunchDiagnosticUiResponse );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
Mon Jan 24 16:32:36 2011
@@ -228,11 +228,6 @@ public final class NoticeOfDisconnect ex
             return true;
         }
 
-        if ( obj instanceof NoticeOfDisconnect )
-        {
-            return true;
-        }
-
-        return false;
+        return ( obj instanceof NoticeOfDisconnect );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntry.java
Mon Jan 24 16:32:36 2011
@@ -42,6 +42,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.util.Strings;
 import org.apache.directory.shared.util.Unicode;
+import org.apache.directory.shared.util.exception.NotImplementedException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -1922,16 +1923,7 @@ public class DefaultEntry implements Ent
                 return true;
             }
 
-            if ( nbOldValues != attribute.size() )
-            {
-                // At least one value have been removed, return true.
-                return true;
-            }
-            else
-            {
-                // No values have been removed, return false.
-                return false;
-            }
+            return nbOldValues != attribute.size();
         }
         catch ( IllegalArgumentException iae )
         {
@@ -1974,16 +1966,7 @@ public class DefaultEntry implements Ent
                 return true;
             }
 
-            if ( nbOldValues != attribute.size() )
-            {
-                // At least one value have been removed, return true.
-                return true;
-            }
-            else
-            {
-                // No values have been removed, return false.
-                return false;
-            }
+            return nbOldValues != attribute.size();
         }
         catch ( IllegalArgumentException iae )
         {
@@ -2026,16 +2009,7 @@ public class DefaultEntry implements Ent
                 return true;
             }
 
-            if ( nbOldValues != attribute.size() )
-            {
-                // At least one value have been removed, return true.
-                return true;
-            }
-            else
-            {
-                // No values have been removed, return false.
-                return false;
-            }
+            return nbOldValues != attribute.size();
         }
         catch ( IllegalArgumentException iae )
         {
@@ -2217,16 +2191,7 @@ public class DefaultEntry implements Ent
                 return true;
             }
 
-            if ( nbOldValues != attribute.size() )
-            {
-                // At least one value have been removed, return true.
-                return true;
-            }
-            else
-            {
-                // No values have been removed, return false.
-                return false;
-            }
+            return nbOldValues != attribute.size();
         }
         else
         {
@@ -2306,16 +2271,7 @@ public class DefaultEntry implements Ent
                 return true;
             }
 
-            if ( nbOldValues != attribute.size() )
-            {
-                // At least one value have been removed, return true.
-                return true;
-            }
-            else
-            {
-                // No values have been removed, return false.
-                return false;
-            }
+            return nbOldValues != attribute.size();
         }
         else
         {
@@ -2394,16 +2350,7 @@ public class DefaultEntry implements Ent
                 return true;
             }
 
-            if ( nbOldValues != attribute.size() )
-            {
-                // At least one value have been removed, return true.
-                return true;
-            }
-            else
-            {
-                // No values have been removed, return false.
-                return false;
-            }
+            return nbOldValues != attribute.size();
         }
         else
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/entry/DefaultEntryAttribute.java
Mon Jan 24 16:32:36 2011
@@ -668,12 +668,7 @@ public class DefaultEntryAttribute imple
         }
         
         // Not found in names, check the OID
-        if ( OID.isOID( id )  && attributeType.getOid().equals( id ) )
-        {
-            return true;
-        }
-
-        return false;
+        return OID.isOID(id) && attributeType.getOid().equals(id);
     }
     
 
@@ -2139,14 +2134,7 @@ public class DefaultEntryAttribute imple
         this.attributeType = attributeType;
         setUpId( null, attributeType );
         
-        if ( attributeType.getSyntax().isHumanReadable() )
-        {
-            isHR = true;
-        }
-        else
-        {
-            isHR = false;
-        }
+        isHR = attributeType.getSyntax().isHumanReadable();
         
         // Compute the hashCode
         rehash();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/BranchNormalizedVisitor.java
Mon Jan 24 16:32:36 2011
@@ -86,12 +86,7 @@ public class BranchNormalizedVisitor imp
 
     public boolean canVisit( ExprNode node )
     {
-        if ( node instanceof BranchNode )
-        {
-            return true;
-        }
-
-        return false;
+        return node instanceof BranchNode;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/LdapURL.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/LdapURL.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/LdapURL.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/model/filter/LdapURL.java
Mon Jan 24 16:32:36 2011
@@ -30,10 +30,10 @@ import java.util.Set;
 
 import org.apache.directory.shared.asn1.Hex;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.model.exception.UrlDecoderException;
+import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.exception.LdapUriException;
+import org.apache.directory.shared.ldap.model.exception.UrlDecoderException;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.util.Chars;
 import org.apache.directory.shared.util.StringConstants;
@@ -449,14 +449,7 @@ public class LdapURL
             {
                 isHostNumber = false;
 
-                if ( Chars.isCharASCII(chars, pos, '-') )
-                {
-                    hadMinus = true;
-                }
-                else
-                {
-                    hadMinus = false;
-                }
+                hadMinus = Chars.isCharASCII(chars, pos, '-');
             }
             else
             {

Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java?rev=1062861&r1=1062860&r2=1062861&view=diff
==============================================================================
--- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java
(original)
+++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java
Mon Jan 24 16:32:36 2011
@@ -322,7 +322,7 @@ public final class Chars
         {
             byte c = bytes[index];
 
-            if ( ( ( c | 0x7F ) != 0x7F ) || ( ALPHA[c] == false ) )
+            if ( ( ( c | 0x7F ) != 0x7F ) || !ALPHA[c] )
             {
                 return false;
             }
@@ -352,7 +352,7 @@ public final class Chars
         {
             char c = chars[index];
 
-            if ( ( c > 127 ) || ( ALPHA[c] == false ) )
+            if ( ( c > 127 ) || !ALPHA[c] )
             {
                 return false;
             }
@@ -389,7 +389,7 @@ public final class Chars
         {
             char c = string.charAt( index );
 
-            if ( ( c > 127 ) || ( ALPHA[c] == false ) )
+            if ( ( c > 127 ) || !ALPHA[c] )
             {
                 return false;
             }
@@ -426,7 +426,7 @@ public final class Chars
         {
             char c = string.charAt( index );
 
-            if ( ( c > 127 ) || ( ALPHA_LOWER_CASE[c] == false ) )
+            if ( ( c > 127 ) || !ALPHA_LOWER_CASE[c] )
             {
                 return false;
             }
@@ -463,7 +463,7 @@ public final class Chars
         {
             char c = string.charAt( index );
 
-            if ( ( c > 127 ) || ( ALPHA_UPPER_CASE[c] == false ) )
+            if ( ( c > 127 ) || !ALPHA_UPPER_CASE[c] )
             {
                 return false;
             }
@@ -500,7 +500,7 @@ public final class Chars
         {
             char c = string.charAt( index );
 
-            if ( ( c > 127 ) || ( ALPHA_DIGIT[c] == false ) )
+            if ( ( c > 127 ) || !ALPHA_DIGIT[c] )
             {
                 return false;
             }
@@ -529,7 +529,7 @@ public final class Chars
         {
             byte c = bytes[index];
 
-            if ( ( ( c | 0x7F ) != 0x7F ) || ( CHAR[c] == false ) )
+            if ( ( ( c | 0x7F ) != 0x7F ) || !CHAR[c] )
             {
                 return false;
             }
@@ -558,7 +558,7 @@ public final class Chars
         {
             char c = chars[index];
 
-            if ( ( c > 127 ) || ( CHAR[c] == false ) )
+            if ( ( c > 127 ) || !CHAR[c] )
             {
                 return false;
             }
@@ -594,7 +594,7 @@ public final class Chars
         {
             char c = string.charAt( index );
 
-            if ( ( c > 127 ) || ( CHAR[c] == false ) )
+            if ( ( c > 127 ) || !CHAR[c] )
             {
                 return false;
             }
@@ -783,7 +783,7 @@ public final class Chars
         {
             byte c = bytes[index];
 
-            if ( ( ( c | 0x7F ) != 0x7F ) || ( HEX[c] == false ) )
+            if ( ( ( c | 0x7F ) != 0x7F ) || !HEX[c] )
             {
                 return false;
             }
@@ -812,7 +812,7 @@ public final class Chars
         {
             char c = chars[index];
 
-            if ( ( c > 127 ) || ( HEX[c] == false ) )
+            if ( ( c > 127 ) || !HEX[c] )
             {
                 return false;
             }
@@ -848,7 +848,7 @@ public final class Chars
         {
             char c = string.charAt( index );
 
-            if ( ( c > 127 ) || ( HEX[c] == false ) )
+            if ( ( c > 127 ) || !HEX[c] )
             {
                 return false;
             }



Mime
View raw message