directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1691853 [1/2] - in /directory/shared/trunk/ldap/model/src: checkstyle/ main/java/org/apache/directory/api/ldap/model/constants/ main/java/org/apache/directory/api/ldap/model/csn/ main/java/org/apache/directory/api/ldap/model/entry/ main/ja...
Date Sun, 19 Jul 2015 20:46:24 GMT
Author: seelmann
Date: Sun Jul 19 20:46:23 2015
New Revision: 1691853

URL: http://svn.apache.org/r1691853
Log:
Fix checkstyle violations

Modified:
    directory/shared/trunk/ldap/model/src/checkstyle/suppressions.xml
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/constants/LdapConstants.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AbstractValue.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AttributeUtils.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterEncoder.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifEntry.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifRevertor.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifUtils.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/Message.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/AddNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/BindNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/CompareNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/DeleteNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyDnNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/SearchNoDResponse.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/ComplexDnParser.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/DnUtils.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitContentRuleHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/LdapSyntaxHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleUseHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/NameFormHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/BaseSubtreeSpecification.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationChecker.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationCheckerLexer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationLexer.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationParser.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/Subentry.java
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/url/LdapUrl.java

Modified: directory/shared/trunk/ldap/model/src/checkstyle/suppressions.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/checkstyle/suppressions.xml?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/checkstyle/suppressions.xml (original)
+++ directory/shared/trunk/ldap/model/src/checkstyle/suppressions.xml Sun Jul 19 20:46:23 2015
@@ -30,9 +30,34 @@
     <suppress files="org.apache.directory.api.ldap.model.schema.LoadableSchemaObject" checks="EqualsHashCode" />
     <suppress files="org.apache.directory.api.ldap.model.schema.LdapComparator" checks="EqualsHashCode" />
     <suppress files="org.apache.directory.api.ldap.model.schema.DITStructureRule" checks="EqualsHashCode" />
-    
+    <suppress files="org.apache.directory.api.ldap.model.schema.LdapSyntax" checks="EqualsHashCode" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.NameForm" checks="EqualsHashCode" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.DitContentRule" checks="EqualsHashCode" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.MatchingRule" checks="EqualsHashCode" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.AttributeType" checks="EqualsHashCode" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.DitStructureRule" checks="EqualsHashCode" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.MatchingRuleUse" checks="EqualsHashCode" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.ObjectClass" checks="EqualsHashCode" />
+
     <!-- No Javadoc for schema constants required -->
     <suppress files="org.apache.directory.api.ldap.model.constants.SchemaConstants" checks="JavadocVariable" />
     <suppress files="org.apache.directory.api.ldap.model.constants.MetaSchemaConstants" checks="JavadocVariable" />
     <suppress files="org.apache.directory.api.ldap.model.constants.PasswordPolicySchemaConstants" checks="JavadocVariable" />
+
+    <!-- We have some long files -->
+    <suppress files="org.apache.directory.api.ldap.model.constants.SchemaConstants" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.message.ResultCodeEnum" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.PrepareString" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.url.LdapUrl" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.schema.registries.Registries" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.entry.DefaultAttribute" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.entry.DefaultEntry" checks="FileLength" />
+    <suppress files="org.apache.directory.api.ldap.model.ldif.LdifReader" checks="FileLength" />
+
+    <!-- Setter return super type, which is not recognized by Checkstyle -->
+    <suppress files="org.apache.directory.api.ldap.model.message" checks="HiddenField" />
+
+    <!-- Contol inferfaces that don't declare any new method -->
+    <suppress files="org.apache.directory.api.ldap.model.message.controls" checks="InterfaceIsType" />
+
 </suppressions>

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/constants/LdapConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/constants/LdapConstants.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/constants/LdapConstants.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/constants/LdapConstants.java Sun Jul 19 20:46:23 2015
@@ -26,8 +26,13 @@ package org.apache.directory.api.ldap.mo
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapConstants
+public final class LdapConstants
 {
     /** The default catch-all ObjectClass filter */
     public static final String OBJECT_CLASS_STAR = "(objectClass=*)";
+
+
+    private LdapConstants()
+    {
+    }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java Sun Jul 19 20:46:23 2015
@@ -468,12 +468,12 @@ public class Csn implements Comparable<C
         }
 
         // Get the changeCount. It should be an 6 digit hex number
-        if ( !Chars.isHex( (byte)chars[23] ) ||
-             !Chars.isHex( (byte)chars[24] ) ||
-             !Chars.isHex( (byte)chars[25] ) ||
-             !Chars.isHex( (byte)chars[26] ) ||
-             !Chars.isHex( (byte)chars[27] ) ||
-             !Chars.isHex( (byte)chars[28] ) )
+        if ( !Chars.isHex( ( byte ) chars[23] )
+            || !Chars.isHex( ( byte ) chars[24] )
+            || !Chars.isHex( ( byte ) chars[25] )
+            || !Chars.isHex( ( byte ) chars[26] )
+            || !Chars.isHex( ( byte ) chars[27] )
+            || !Chars.isHex( ( byte ) chars[28] ) )
         {
             return false;
         }
@@ -484,9 +484,9 @@ public class Csn implements Comparable<C
         }
         
         // Get the replicaID, which should be a 3 digits hex number
-        if ( !Chars.isHex( (byte)chars[30] ) || 
-             !Chars.isHex( (byte)chars[31] ) || 
-             !Chars.isHex( (byte)chars[32] ) )
+        if ( !Chars.isHex( ( byte ) chars[30] )
+            || !Chars.isHex( ( byte ) chars[31] )
+            || !Chars.isHex( ( byte ) chars[32] ) )
         {
             return false;
         }
@@ -497,12 +497,12 @@ public class Csn implements Comparable<C
         }
 
         // Check the modification number, which should be a 6 digits hex number
-        if ( !Chars.isHex( (byte)chars[34] ) ||
-             !Chars.isHex( (byte)chars[35] ) ||
-             !Chars.isHex( (byte)chars[36] ) ||
-             !Chars.isHex( (byte)chars[37] ) ||
-             !Chars.isHex( (byte)chars[38] ) ||
-             !Chars.isHex( (byte)chars[39] ) )
+        if ( !Chars.isHex( ( byte ) chars[34] )
+            || !Chars.isHex( ( byte ) chars[35] )
+            || !Chars.isHex( ( byte ) chars[36] )
+            || !Chars.isHex( ( byte ) chars[37] )
+            || !Chars.isHex( ( byte ) chars[38] )
+            || !Chars.isHex( ( byte ) chars[39] ) )
         {
             return false;
         }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AbstractValue.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AbstractValue.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AbstractValue.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AbstractValue.java Sun Jul 19 20:46:23 2015
@@ -151,8 +151,8 @@ public abstract class AbstractValue<T> i
 
                     if ( isHR != isHumanReadable() )
                     {
-                        String message = "The '" + attributeType.getName() + "' AttributeType and values must " +
-                            "both be String or binary";
+                        String message = "The '" + attributeType.getName() + "' AttributeType and values must "
+                            + "both be String or binary";
                         LOG.error( message );
                         throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message );
                     }
@@ -178,8 +178,7 @@ public abstract class AbstractValue<T> i
             }
             else
             {
-                String message = "The '" + attributeType.getName() + "' AttributeType does not have" +
-                    " a normalizer";
+                String message = "The '" + attributeType.getName() + "' AttributeType does not have" + " a normalizer";
                 LOG.error( message );
                 throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, message );
             }
@@ -246,9 +245,8 @@ public abstract class AbstractValue<T> i
      */
     public boolean isInstanceOf( AttributeType attributeType )
     {
-        return ( attributeType != null ) &&
-            ( this.attributeType.equals( attributeType ) ||
-            this.attributeType.isDescendantOf( attributeType ) );
+        return ( attributeType != null )
+            && ( this.attributeType.equals( attributeType ) || this.attributeType.isDescendantOf( attributeType ) );
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AttributeUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AttributeUtils.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AttributeUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/AttributeUtils.java Sun Jul 19 20:46:23 2015
@@ -47,6 +47,10 @@ import org.apache.directory.api.util.Str
  */
 public final class AttributeUtils
 {
+    private AttributeUtils()
+    {
+    }
+
 
     /**
      * Check if an attribute contains a value. The test is case insensitive,

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/DefaultAttribute.java Sun Jul 19 20:46:23 2015
@@ -1844,9 +1844,8 @@ public class DefaultAttribute implements
      */
     public boolean isInstanceOf( AttributeType attributeType ) throws LdapInvalidAttributeValueException
     {
-        return ( attributeType != null ) &&
-            ( this.attributeType.equals( attributeType ) ||
-            this.attributeType.isDescendantOf( attributeType ) );
+        return ( attributeType != null )
+            && ( this.attributeType.equals( attributeType ) || this.attributeType.isDescendantOf( attributeType ) );
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterEncoder.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterEncoder.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterEncoder.java Sun Jul 19 20:46:23 2015
@@ -29,11 +29,16 @@ import java.text.MessageFormat;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class FilterEncoder
+public final class FilterEncoder
 {
     private static final String[] EMPTY = new String[0];
 
 
+    private FilterEncoder()
+    {
+    }
+
+
     /**
      * Formats a filter and handles encoding of special characters in the value arguments using the
      * &lt;valueencoding&gt; rule as described in <a href="http://www.ietf.org/rfc/rfc4515.txt">RFC 4515</a>.

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/filter/FilterParser.java Sun Jul 19 20:46:23 2015
@@ -42,12 +42,9 @@ import org.apache.directory.api.util.Uni
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class FilterParser
+public final class FilterParser
 {
-    /**
-     * Creates a filter parser implementation.
-     */
-    public FilterParser()
+    private FilterParser()
     {
     }
 
@@ -280,8 +277,10 @@ public class FilterParser
                 // not a valid char, so let's get out
                 break;
             }
+
+            b = Strings.byteAt( filter, pos.start );
         }
-        while ( ( b = Strings.byteAt( filter, pos.start ) ) != '\0' );
+        while ( b != '\0' );
 
         if ( current != 0 )
         {
@@ -413,8 +412,10 @@ public class FilterParser
                 // not a valid char, so let's get out
                 break;
             }
+
+            b = Strings.byteAt( filter, pos.start );
         }
-        while ( ( b = Strings.byteAt( filter, pos.start ) ) != '\0' );
+        while ( b != '\0' );
 
         if ( current != 0 )
         {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifEntry.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifEntry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifEntry.java Sun Jul 19 20:46:23 2015
@@ -288,6 +288,9 @@ public class LdifEntry implements Clonea
                     }
 
                     break;
+
+                default:
+                    throw new IllegalArgumentException( "Unexpected ChangeType: " + changeType );
             }
         }
     }
@@ -1321,6 +1324,9 @@ public class LdifEntry implements Clonea
                 }
 
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected ChangeType: " + changeType );
         }
 
         int nbControls = in.readInt();
@@ -1408,6 +1414,9 @@ public class LdifEntry implements Clonea
                 }
 
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected ChangeType: " + changeType );
         }
 
         // The controls

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java Sun Jul 19 20:46:23 2015
@@ -2150,7 +2150,9 @@ public class LdifReader implements Itera
             reader.close();
             containsEntries = false;
             containsChanges = false;
-            offset = entryOffset = lineNumber = 0;
+            offset = 0;
+            entryOffset = 0;
+            lineNumber = 0;
         }
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifRevertor.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifRevertor.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifRevertor.java Sun Jul 19 20:46:23 2015
@@ -492,8 +492,8 @@ public final class LdifRevertor
                 // Is the new Rdn AVAs contained into the entry?
                 for ( Ava atav : newRdn )
                 {
-                    if ( !atav.equals( oldRdn.getAva() ) &&
-                         ( entry.contains( atav.getNormType(), atav.getNormValue().getString() ) ) )
+                    if ( !atav.equals( oldRdn.getAva() )
+                        && ( entry.contains( atav.getNormType(), atav.getNormValue().getString() ) ) )
                     {
                         existInEntry = true;
                     }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifUtils.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifUtils.java Sun Jul 19 20:46:23 2015
@@ -500,6 +500,10 @@ public final class LdifUtils
                         case REPLACE_ATTRIBUTE:
                             sb.append( "replace: " );
                             break;
+
+                        default:
+                            throw new IllegalArgumentException( "Unexpected ModificationOperation: "
+                                + modification.getOperation() );
                     }
 
                     sb.append( modification.getAttribute().getUpId() );
@@ -510,6 +514,9 @@ public final class LdifUtils
                 }
 
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected ChangeType: " + entry.getChangeType() );
         }
 
         sb.append( '\n' );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/BindRequestImpl.java Sun Jul 19 20:46:23 2015
@@ -70,7 +70,7 @@ public class BindRequestImpl extends Abs
     private boolean isVersion3 = true;
 
     /** The associated response */
-    public BindResponse response;
+    private BindResponse response;
 
 
     // ------------------------------------------------------------------------

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/Message.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/Message.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/Message.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/Message.java Sun Jul 19 20:46:23 2015
@@ -78,10 +78,10 @@ public interface Message
     /**
      * Adds an array of controls to this Message.
      * 
-     * @param controls the controls to add.
+     * @param controlsToAdd the controls to add.
      * @return A Message reference
      */
-    Message addAllControls( Control[] controls );
+    Message addAllControls( Control[] controlsToAdd );
 
 
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ModifyRequestImpl.java Sun Jul 19 20:46:23 2015
@@ -452,6 +452,10 @@ public class ModifyRequestImpl extends A
                     case REMOVE_ATTRIBUTE:
                         sb.append( " delete\n" );
                         break;
+
+                    default:
+                        throw new IllegalArgumentException( "Unexpected ModificationOperation "
+                            + modification.getOperation() );
                 }
 
                 sb.append( "                Modification\n" );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/ResultCodeEnum.java Sun Jul 19 20:46:23 2015
@@ -1693,10 +1693,13 @@ public enum ResultCodeEnum
 
             case UNBIND_REQUEST:
                 return set.iterator().next();
-                
-            case INTERMEDIATE_RESPONSE :
+
+            case INTERMEDIATE_RESPONSE:
                 candidates = intersection( set, SEARCH_CODES );
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected MessageTypeEnum " + type );
         }
 
         // we don't want any codes that do not have anything to do w/ errors
@@ -1832,9 +1835,8 @@ public enum ResultCodeEnum
      */
     private static Set<ResultCodeEnum> getResultCodes( Throwable t )
     {
-        ResultCodeEnum rc;
-
-        if ( ( rc = getResultCode( t ) ) != null )
+        ResultCodeEnum rc = getResultCode( t );
+        if ( rc != null )
         {
             return Collections.singleton( rc );
         }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequestImpl.java Sun Jul 19 20:46:23 2015
@@ -512,6 +512,9 @@ public class SearchRequestImpl extends A
             case SUBTREE:
                 sb.append( "whole subtree" );
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected scope " + scope );
         }
 
         sb.append( '\n' );
@@ -563,6 +566,9 @@ public class SearchRequestImpl extends A
             case DEREF_ALWAYS:
                 sb.append( "deref Always" );
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected aliasDerefMode " + aliasDerefMode );
         }
 
         sb.append( '\n' );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/EntryChangeImpl.java Sun Jul 19 20:46:23 2015
@@ -114,9 +114,8 @@ public class EntryChangeImpl extends Abs
 
         EntryChange otherControl = ( EntryChange ) o;
 
-        return ( changeNumber == otherControl.getChangeNumber() ) &&
-            ( changeType == otherControl.getChangeType() ) &&
-            ( previousDn.equals( otherControl.getPreviousDn() ) );
+        return ( changeNumber == otherControl.getChangeNumber() ) && ( changeType == otherControl.getChangeType() )
+            && ( previousDn.equals( otherControl.getPreviousDn() ) );
     }
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/PagedResultsImpl.java Sun Jul 19 20:46:23 2015
@@ -122,6 +122,8 @@ public class PagedResultsImpl extends Ab
                     + ( ( cookie[2] & 0x00FF ) << 8 ) + ( cookie[3] & 0x00FF );
                 break;
 
+            default:
+                break;
         }
 
         return value;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/controls/SortResponseControlImpl.java Sun Jul 19 20:46:23 2015
@@ -75,23 +75,23 @@ public class SortResponseControlImpl ext
     @Override
     public boolean equals( Object o )
     {
-        if( !super.equals( o ) )
+        if ( !super.equals( o ) )
         {
             return false;
         }
         
         SortResponse that = ( SortResponse ) o;
         
-        if( result != that.getSortResult() )
+        if ( result != that.getSortResult() )
         {
             return false;
         }
         
-        if( attributeName != null )
+        if ( attributeName != null )
         {
             return ( attributeName.equalsIgnoreCase( that.getAttributeName() ) );
         }
-        else if( that.getAttributeName() == null )
+        else if ( that.getAttributeName() == null )
         {
             return true;
         }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/AddNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/AddNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/AddNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/AddNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the Add response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AddNoDResponse extends AddResponseImpl
+public final class AddNoDResponse extends AddResponseImpl
 {
     /** The OID of the NotiveOfDisconnect extended operation. */
     public static final String EXTENSION_OID = NoticeOfDisconnect.EXTENSION_OID;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/BindNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/BindNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/BindNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/BindNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the Bind response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BindNoDResponse extends BindResponseImpl
+public final class BindNoDResponse extends BindResponseImpl
 {
     /** The OID of the NotiveOfDisconnect extended operation. */
     public static final String EXTENSION_OID = NoticeOfDisconnect.EXTENSION_OID;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/CompareNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/CompareNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/CompareNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/CompareNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the Compare response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CompareNoDResponse extends CompareResponseImpl
+public final class CompareNoDResponse extends CompareResponseImpl
 {
     /** The OID of the NotiveOfDisconnect extended operation. */
     public static final String EXTENSION_OID = NoticeOfDisconnect.EXTENSION_OID;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/DeleteNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/DeleteNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/DeleteNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/DeleteNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the Delete response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DeleteNoDResponse extends DeleteResponseImpl
+public final class DeleteNoDResponse extends DeleteResponseImpl
 {
     /** The OID of the NotiveOfDisconnect extended operation. */
     public static final String EXTENSION_OID = NoticeOfDisconnect.EXTENSION_OID;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ExtendedNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the Extended response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ExtendedNoDResponse extends ExtendedResponseImpl
+public final class ExtendedNoDResponse extends ExtendedResponseImpl
 {
     /** The serial version UID */
     static final long serialVersionUID = 2L;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyDnNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyDnNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyDnNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyDnNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the ModifyDn response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDnNoDResponse extends ModifyDnResponseImpl
+public final class ModifyDnNoDResponse extends ModifyDnResponseImpl
 {
     /** The OID of the NotiveOfDisconnect extended operation. */
     public static final String EXTENSION_OID = NoticeOfDisconnect.EXTENSION_OID;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/ModifyNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the Modify response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyNoDResponse extends ModifyResponseImpl
+public final class ModifyNoDResponse extends ModifyResponseImpl
 {
     /** The OID of the NotiveOfDisconnect extended operation. */
     public static final String EXTENSION_OID = NoticeOfDisconnect.EXTENSION_OID;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/SearchNoDResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/SearchNoDResponse.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/SearchNoDResponse.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/extended/SearchNoDResponse.java Sun Jul 19 20:46:23 2015
@@ -30,7 +30,7 @@ import org.apache.directory.api.ldap.mod
  * disconnection for the Search response. 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchNoDResponse extends SearchResultDoneImpl
+public final class SearchNoDResponse extends SearchResultDoneImpl
 {
     /** The OID of the NotiveOfDisconnect extended operation. */
     public static final String EXTENSION_OID = NoticeOfDisconnect.EXTENSION_OID;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/ComplexDnParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/ComplexDnParser.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/ComplexDnParser.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/ComplexDnParser.java Sun Jul 19 20:46:23 2015
@@ -25,8 +25,6 @@ import java.util.List;
 
 import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
-import org.apache.directory.api.ldap.model.name.AntlrDnLexer;
-import org.apache.directory.api.ldap.model.name.AntlrDnParser;
 
 
 /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/DnUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/DnUtils.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/DnUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/name/DnUtils.java Sun Jul 19 20:46:23 2015
@@ -53,4 +53,9 @@ public final class DnUtils
         int index = rdn.indexOf( '=' );
         return rdn.substring( index + 1, rdn.length() );
     }
+
+
+    private DnUtils()
+    {
+    }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java Sun Jul 19 20:46:23 2015
@@ -44,7 +44,7 @@ import org.apache.directory.api.util.Uni
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PasswordUtil
+public final class PasswordUtil
 {
 
     /** The SHA1 hash length */
@@ -66,6 +66,11 @@ public class PasswordUtil
     public static final int PKCS5S2_LENGTH = 32;
 
 
+    private PasswordUtil()
+    {
+    }
+
+
     /**
      * Get the algorithm from the stored password. 
      * It can be found on the beginning of the stored password, between 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectRenderer.java Sun Jul 19 20:46:23 2015
@@ -38,7 +38,7 @@ import java.util.List;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SchemaObjectRenderer
+public final class SchemaObjectRenderer
 {
     /**
      * Preconfigured {@link SchemaObjectRenderer} that renders the schema object without line break and with

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectSorter.java Sun Jul 19 20:46:23 2015
@@ -29,18 +29,18 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.TreeMap;
 
-import org.apache.directory.api.ldap.model.schema.AttributeType;
-import org.apache.directory.api.ldap.model.schema.ObjectClass;
-import org.apache.directory.api.ldap.model.schema.SchemaObject;
-
 
 /**
  * Various utility methods for sorting schema objects.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SchemaObjectSorter
+public final class SchemaObjectSorter
 {
+    private SchemaObjectSorter()
+    {
+    }
+
 
     /**
      * Gets an hierarchical ordered {@link Iterable} of the given {@link AttributeType}s. 
@@ -86,7 +86,7 @@ public class SchemaObjectSorter
 
     }
 
-    private static class SchemaObjectIterable<T extends SchemaObject> implements Iterable<T>
+    private static final class SchemaObjectIterable<T extends SchemaObject> implements Iterable<T>
     {
 
         private final List<T> schemaObjects;
@@ -108,7 +108,7 @@ public class SchemaObjectSorter
 
     }
 
-    private static class SchemaObjectIterator<T extends SchemaObject> implements Iterator<T>
+    private static final class SchemaObjectIterator<T extends SchemaObject> implements Iterator<T>
     {
         private final List<T> schemaObjects;
         private final ReferenceCallback<T> callback;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaObjectType.java Sun Jul 19 20:46:23 2015
@@ -118,6 +118,9 @@ public enum SchemaObjectType
             case SYNTAX_CHECKER:
                 schemaObjectPath = SchemaConstants.SYNTAX_CHECKERS_PATH;
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected SchemaObjectType " + this );
         }
 
         return schemaObjectPath;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaUtils.java Sun Jul 19 20:46:23 2015
@@ -593,7 +593,7 @@ public final class SchemaUtils
         
         char c = attributeName.charAt( 0 );
         
-        if ( ( ( c >= 'a') && ( c <= 'z' ) ) || ( ( c >= 'A' ) && ( c <= 'Z' ) ) )
+        if ( ( ( c >= 'a' ) && ( c <= 'z' ) ) || ( ( c >= 'A' ) && ( c <= 'Z' ) ) )
         {
             descr = true;
         }
@@ -615,11 +615,11 @@ public final class SchemaUtils
             if ( descr )
             {
                 // This is a descr, iterate on KeyChars (ALPHA / DIGIT / HYPHEN / USCORE)
-                if ( ( ( c < 'a') || ( c > 'z' ) ) && 
-                     ( ( c < 'A' ) || ( c > 'Z' ) ) && 
-                     ( ( c < '0' ) || ( c > '9' ) ) &&
-                     ( c != '-' ) &&
-                     ( c != '_' ) )
+                if ( ( ( c < 'a' ) || ( c > 'z' ) )
+                    && ( ( c < 'A' ) || ( c > 'Z' ) )
+                    && ( ( c < '0' ) || ( c > '9' ) )
+                    && ( c != '-' )
+                    && ( c != '_' ) )
                 {
                     return false;
                 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/IntegerComparator.java Sun Jul 19 20:46:23 2015
@@ -133,7 +133,7 @@ public class IntegerComparator extends L
         }
         catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue ) , ioe);
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, backendValue ), ioe );
         }
         try
         {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/NumericStringComparator.java Sun Jul 19 20:46:23 2015
@@ -94,7 +94,7 @@ public class NumericStringComparator ext
         }
         catch ( IOException ioe )
         {
-            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ) , ioe);
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_04224, assertValue ), ioe );
         }
 
         return backendValue.compareTo( assertValue );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/comparators/UuidComparator.java Sun Jul 19 20:46:23 2015
@@ -40,7 +40,7 @@ public class UuidComparator extends Seri
     private static final Logger LOG = LoggerFactory.getLogger( UuidComparator.class );
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
-    public static UuidComparator INSTANCE = new UuidComparator( "1.3.6.1.1.16.4" );
+    public static final UuidComparator INSTANCE = new UuidComparator( "1.3.6.1.1.16.4" );
 
 
     /**

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/ConcreteNameComponentNormalizer.java Sun Jul 19 20:46:23 2015
@@ -97,6 +97,8 @@ public class ConcreteNameComponentNormal
                     low = c;
                     newVal[pos++] = ( char ) Hex.getHexValue( high, low );
 
+                default:
+                    throw new IllegalStateException( "escaped can never have such a value: " + value );
             }
         }
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/DefaultComparatorRegistry.java Sun Jul 19 20:46:23 2015
@@ -117,7 +117,7 @@ public class DefaultComparatorRegistry e
                 sb.append( ", " );
             }
 
-            LdapComparator<?> comparator =entry.getValue();
+            LdapComparator<?> comparator = entry.getValue();
 
             String fqcn = comparator.getFqcn();
             int lastDotPos = fqcn.lastIndexOf( '.' );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java Sun Jul 19 20:46:23 2015
@@ -601,11 +601,7 @@ public class Registries implements Schem
      */
     private void buildDitContentRuleReferences( List<Throwable> errors )
     {
-        for ( @SuppressWarnings("unused")
-        DitContentRule ditContentRule : ditContentRuleRegistry )
-        {
-            // TODO
-        }
+        // TODO: implement
     }
 
 
@@ -614,11 +610,7 @@ public class Registries implements Schem
      */
     private void buildDitStructureRuleReferences( List<Throwable> errors )
     {
-        for ( @SuppressWarnings("unused")
-        DitStructureRule ditStructureRule : ditStructureRuleRegistry )
-        {
-            // TODO
-        }
+        // TODO: implement
     }
 
 
@@ -687,6 +679,15 @@ public class Registries implements Schem
                 case OBJECT_CLASS:
                     ObjectClassHelper.addToRegistries( ( ObjectClass ) schemaObject, errors, this );
                     break;
+
+                case SYNTAX_CHECKER:
+                case NORMALIZER:
+                case COMPARATOR:
+                    // Those are not registered
+                    break;
+
+                default:
+                    throw new IllegalArgumentException( "Unexpected SchemaObjectType: " + schemaObject.getObjectType() );
             }
         }
         catch ( LdapException ne )
@@ -741,6 +742,15 @@ public class Registries implements Schem
                 case MATCHING_RULE_USE :
                     // TODO
                     break;
+
+                case SYNTAX_CHECKER:
+                case NORMALIZER:
+                case COMPARATOR:
+                    // Those were not registered
+                    break;
+
+                default:
+                    throw new IllegalArgumentException( "Unexpected SchemaObjectType: " + schemaObject.getObjectType() );
             }
         }
         catch ( LdapException ne )
@@ -784,11 +794,7 @@ public class Registries implements Schem
      */
     private void buildNameFormReferences( List<Throwable> errors )
     {
-        for ( @SuppressWarnings("unused")
-        NameForm nameFormRule : nameFormRegistry )
-        {
-            // TODO
-        }
+        // TODO: implement
     }
 
 
@@ -1511,11 +1517,8 @@ public class Registries implements Schem
         LOG.debug( "Registering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
         // Check that the SchemaObject is not already registered
-        if ( schemaObject instanceof LoadableSchemaObject )
-        {
-            // TODO : Check for existing Loadable SchemaObject
-        }
-        else
+        // TODO : Check for existing Loadable SchemaObject
+        if ( !( schemaObject instanceof LoadableSchemaObject ) )
         {
             if ( globalOidRegistry.contains( schemaObject.getOid() ) )
             {
@@ -1576,6 +1579,9 @@ public class Registries implements Schem
                 case SYNTAX_CHECKER:
                     syntaxCheckerRegistry.register( ( SyntaxChecker ) schemaObject );
                     break;
+
+                default:
+                    throw new IllegalArgumentException( "Unexpected SchemaObjectType: " + schemaObject.getObjectType() );
             }
         }
         catch ( Exception e )
@@ -1728,11 +1734,8 @@ public class Registries implements Schem
         LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );
 
         // Check that the SchemaObject is present in the registries
-        if ( schemaObject instanceof LoadableSchemaObject )
-        {
-            // TODO : check for an existing Loadable SchemaObject
-        }
-        else
+        // TODO : check for an existing Loadable SchemaObject
+        if ( !( schemaObject instanceof LoadableSchemaObject ) )
         {
             if ( !globalOidRegistry.contains( schemaObject.getOid() ) )
             {
@@ -1791,6 +1794,9 @@ public class Registries implements Schem
             case SYNTAX_CHECKER:
                 unregistered = syntaxCheckerRegistry.unregister( ( SyntaxChecker ) schemaObject );
                 break;
+
+            default:
+                throw new IllegalArgumentException( "Unexpected SchemaObjectType: " + schemaObject.getObjectType() );
         }
 
         return unregistered;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/AttributeTypeHelper.java Sun Jul 19 20:46:23 2015
@@ -43,8 +43,12 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class AttributeTypeHelper
+public final class AttributeTypeHelper
 {
+    private AttributeTypeHelper()
+    {
+    }
+
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( AttributeTypeHelper.class );
 
@@ -154,7 +158,7 @@ public class AttributeTypeHelper
             // This AT has a superior
             try
             {
-                currentSuperior = (MutableAttributeType)attributeTypeRegistry.lookup( superiorOid );
+                currentSuperior = ( MutableAttributeType ) attributeTypeRegistry.lookup( superiorOid );
             }
             catch ( Exception e )
             {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitContentRuleHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitContentRuleHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitContentRuleHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitContentRuleHelper.java Sun Jul 19 20:46:23 2015
@@ -35,8 +35,13 @@ import org.apache.directory.api.ldap.mod
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DitContentRuleHelper
+public final class DitContentRuleHelper
 {
+    private DitContentRuleHelper()
+    {
+    }
+
+
     /**
      * Inject the DitContentRule into the registries, updating the references to
      * other SchemaObject

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/DitStructureRuleHelper.java Sun Jul 19 20:46:23 2015
@@ -33,8 +33,13 @@ import org.apache.directory.api.ldap.mod
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DitStructureRuleHelper
+public final class DitStructureRuleHelper
 {
+    private DitStructureRuleHelper()
+    {
+    }
+
+
     /**
      * Inject the DitContentRule into the registries, updating the references to
      * other SchemaObject

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/LdapSyntaxHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/LdapSyntaxHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/LdapSyntaxHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/LdapSyntaxHelper.java Sun Jul 19 20:46:23 2015
@@ -35,8 +35,13 @@ import org.apache.directory.api.ldap.mod
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LdapSyntaxHelper
+public final class LdapSyntaxHelper
 {
+    private LdapSyntaxHelper()
+    {
+    }
+
+
     /**
      * Inject the LdapSyntax into the registries, updating the references to
      * other SchemaObject

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleHelper.java Sun Jul 19 20:46:23 2015
@@ -44,12 +44,17 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class MatchingRuleHelper
+public final class MatchingRuleHelper
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( MatchingRuleHelper.class );
 
 
+    private MatchingRuleHelper()
+    {
+    }
+
+
     /**
      * Inject the MatchingRule into the Registries, updating the references to
      * other SchemaObject

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleUseHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleUseHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleUseHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/MatchingRuleUseHelper.java Sun Jul 19 20:46:23 2015
@@ -34,8 +34,13 @@ import org.apache.directory.api.ldap.mod
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class MatchingRuleUseHelper
+public final class MatchingRuleUseHelper
 {
+    private MatchingRuleUseHelper()
+    {
+    }
+
+
     /**
      * Inject the MatchingRuleUse into the registries, updating the references to
      * other SchemaObject

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/NameFormHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/NameFormHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/NameFormHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/NameFormHelper.java Sun Jul 19 20:46:23 2015
@@ -35,8 +35,13 @@ import org.apache.directory.api.ldap.mod
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class NameFormHelper
+public final class NameFormHelper
 {
+    private NameFormHelper()
+    {
+    }
+
+
     /**
      * Inject the NameForm into the registries, updating the references to
      * other SchemaObject

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/helper/ObjectClassHelper.java Sun Jul 19 20:46:23 2015
@@ -40,8 +40,12 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ObjectClassHelper
+public final class ObjectClassHelper
 {
+    private ObjectClassHelper()
+    {
+    }
+
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( ObjectClassHelper.class );
 
@@ -171,6 +175,10 @@ public class ObjectClassHelper
                             }
 
                             break;
+
+                        default:
+                            throw new IllegalArgumentException( "Unexpected ObjectClassTypeEnum: "
+                                + objectClass.getType() );
                     }
 
                     objectClass.getSuperiors().add( superior );

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DeliveryMethodSyntaxChecker.java Sun Jul 19 20:46:23 2015
@@ -171,7 +171,8 @@ public class DeliveryMethodSyntaxChecker
         int pos = 0;
         Set<String> pmds = new HashSet<String>();
 
-        if ( ( pos = isPdm( strValue, pos, pmds ) ) == -1 )
+        pos = isPdm( strValue, pos, pmds );
+        if ( pos == -1 )
         {
             LOG.debug( "Syntax invalid for '{}'", value );
             return false;
@@ -205,7 +206,8 @@ public class DeliveryMethodSyntaxChecker
                 pos++;
             }
 
-            if ( ( pos = isPdm( strValue, pos, pmds ) ) == -1 )
+            pos = isPdm( strValue, pos, pmds );
+            if ( pos == -1 )
             {
                 LOG.debug( "Syntax invalid for '{}'", value );
                 return false;

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/syntaxCheckers/DerefAliasSyntaxChecker.java Sun Jul 19 20:46:23 2015
@@ -84,8 +84,7 @@ public class DerefAliasSyntaxChecker ext
 
         strValue = Strings.trim( Strings.toLowerCase( strValue ) );
 
-        return ( "never".equals( strValue ) ||
-            "finding".equals( strValue ) ||
-            "searching".equals( strValue ) || "always".equals( strValue ) );
+        return ( "never".equals( strValue ) || "finding".equals( strValue ) || "searching".equals( strValue ) || "always"
+            .equals( strValue ) );
     }
 }

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/BaseSubtreeSpecification.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/BaseSubtreeSpecification.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/BaseSubtreeSpecification.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/BaseSubtreeSpecification.java Sun Jul 19 20:46:23 2015
@@ -293,8 +293,7 @@ public class BaseSubtreeSpecification im
         }
 
         // The chopBefore exclusions
-        if ( ( ( chopBefore != null ) && !chopBefore.isEmpty() ) ||
-            ( ( chopAfter != null ) && !chopAfter.isEmpty() ) )
+        if ( ( ( chopBefore != null ) && !chopBefore.isEmpty() ) || ( ( chopAfter != null ) && !chopAfter.isEmpty() ) )
         {
             if ( isFirst )
             {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationChecker.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationChecker.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationChecker.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationChecker.java Sun Jul 19 20:46:23 2015
@@ -21,8 +21,6 @@
 package org.apache.directory.api.ldap.model.subtree;
 
 
-import org.apache.directory.api.ldap.model.subtree.AntlrSubtreeSpecificationChecker;
-
 import antlr.TokenStream;
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationCheckerLexer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationCheckerLexer.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationCheckerLexer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationCheckerLexer.java Sun Jul 19 20:46:23 2015
@@ -23,8 +23,6 @@ package org.apache.directory.api.ldap.mo
 
 import java.io.Reader;
 
-import org.apache.directory.api.ldap.model.subtree.AntlrSubtreeSpecificationCheckerLexer;
-
 import antlr.CharBuffer;
 import antlr.LexerSharedInputState;
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationLexer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationLexer.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationLexer.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationLexer.java Sun Jul 19 20:46:23 2015
@@ -23,8 +23,6 @@ package org.apache.directory.api.ldap.mo
 
 import java.io.Reader;
 
-import org.apache.directory.api.ldap.model.subtree.AntlrSubtreeSpecificationLexer;
-
 import antlr.CharBuffer;
 import antlr.LexerSharedInputState;
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationParser.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationParser.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/ReusableAntlrSubtreeSpecificationParser.java Sun Jul 19 20:46:23 2015
@@ -21,8 +21,6 @@
 package org.apache.directory.api.ldap.model.subtree;
 
 
-import org.apache.directory.api.ldap.model.subtree.AntlrSubtreeSpecificationParser;
-
 import antlr.TokenStream;
 
 

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/Subentry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/Subentry.java?rev=1691853&r1=1691852&r2=1691853&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/Subentry.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/subtree/Subentry.java Sun Jul 19 20:46:23 2015
@@ -83,8 +83,8 @@ public class Subentry
      */
     public final boolean isCollectiveAdminRole()
     {
-        return administrativeRoles.contains( AdministrativeRole.CollectiveAttributeInnerArea ) ||
-            administrativeRoles.contains( AdministrativeRole.CollectiveAttributeSpecificArea );
+        return administrativeRoles.contains( AdministrativeRole.CollectiveAttributeInnerArea )
+            || administrativeRoles.contains( AdministrativeRole.CollectiveAttributeSpecificArea );
     }
 
 
@@ -102,8 +102,8 @@ public class Subentry
      */
     public final boolean isAccessControlAdminRole()
     {
-        return administrativeRoles.contains( AdministrativeRole.AccessControlSpecificArea ) ||
-            administrativeRoles.contains( AdministrativeRole.AccessControlInnerArea );
+        return administrativeRoles.contains( AdministrativeRole.AccessControlSpecificArea )
+            || administrativeRoles.contains( AdministrativeRole.AccessControlInnerArea );
     }
 
 
@@ -112,8 +112,8 @@ public class Subentry
      */
     public final boolean isTriggersAdminRole()
     {
-        return administrativeRoles.contains( AdministrativeRole.TriggerExecutionSpecificArea ) ||
-            administrativeRoles.contains( AdministrativeRole.TriggerExecutionInnerArea );
+        return administrativeRoles.contains( AdministrativeRole.TriggerExecutionSpecificArea )
+            || administrativeRoles.contains( AdministrativeRole.TriggerExecutionInnerArea );
     }
 
 



Mime
View raw message