directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1004214 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap: schema/ schema/parsers/ schema/registries/ subtree/ util/
Date Mon, 04 Oct 2010 12:03:46 GMT
Author: seelmann
Date: Mon Oct  4 12:03:45 2010
New Revision: 1004214

URL: http://svn.apache.org/viewvc?rev=1004214&view=rev
Log:
Fix checkstyle errors: HiddenField and Javadoc

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AbstractSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AbstractSchemaLoader.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchema.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/GeneralizedTime.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AbstractSchemaObject.java Mon Oct  4 12:03:45 2010
@@ -113,10 +113,11 @@ public abstract class AbstractSchemaObje
 
 
     /**
-     * A constructor for a SchemaObject instance. It must be 
+     * A constructor for a SchemaObject instance. It must be
      * invoked by the inherited class.
-     * 
+     *
      * @param objectType The SchemaObjectType to create
+     * @param oid the SchemaObject numeric OID
      */
     protected AbstractSchemaObject( SchemaObjectType objectType, String oid )
     {
@@ -213,11 +214,7 @@ public abstract class AbstractSchemaObje
 
 
     /**
-     * Inject this SchemaObject to the given registries, updating the references to
-     * other SchemaObject
-     *
-     * @param errors The errors we got
-     * @param registries The Registries
+     * {@inheritDoc}
      */
     public void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
@@ -226,11 +223,7 @@ public abstract class AbstractSchemaObje
 
 
     /**
-     * Remove this SchemaObject from the given registries, updating the references to
-     * other SchemaObject
-     *
-     * @param errors The errors we got
-     * @param registries The Registries
+     * {@inheritDoc}
      */
     public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
@@ -253,9 +246,9 @@ public abstract class AbstractSchemaObje
      * Add a new name to the list of names for this SchemaObject. The name
      * is lowercased and trimmed.
      *  
-     * @param names The names to add
+     * @param namesToAdd The names to add
      */
-    public void addName( String... names )
+    public void addName( String... namesToAdd )
     {
         if ( locked )
         {
@@ -273,7 +266,7 @@ public abstract class AbstractSchemaObje
                 lowerNames.add( StringTools.toLowerCase( name ) );
             }
 
-            for ( String name : names )
+            for ( String name : namesToAdd )
             {
                 if ( name != null )
                 {
@@ -465,16 +458,16 @@ public abstract class AbstractSchemaObje
     /**
      * Sets the SchemaObject readOnly flag
      * 
-     * @param isReadOnly The current SchemaObject ReadOnly status
+     * @param readOnly The current SchemaObject ReadOnly status
      */
-    public void setReadOnly( boolean isReadOnly )
+    public void setReadOnly( boolean readOnly )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        this.isReadOnly = isReadOnly;
+        this.isReadOnly = readOnly;
     }
 
 
@@ -631,8 +624,9 @@ public abstract class AbstractSchemaObje
      * The hashcode is currently computed in the lock() method, which is a hack
      * that should be fixed.
      * 
-     * @see Object#hashCode()
+     * @return {@inheritDoc}
      */
+    @Override
     public final int hashCode()
     {
         return h;
@@ -640,8 +634,9 @@ public abstract class AbstractSchemaObje
 
 
     /**
-     * @see Object#equals(Object)
+     * @{@inheritDoc}
      */
+    @Override
     public boolean equals( Object o1 )
     {
         if ( this == o1 )
@@ -812,8 +807,11 @@ public abstract class AbstractSchemaObje
 
 
     /**
-     * Compare two oids, and return true if they are both null or
-     * equals
+     * Compare two oids, and return true if they are both null or equal.
+     *
+     * @param oid1 the first OID
+     * @param oid2 the second OID
+     * @return <code>true</code> if both OIDs are null or equal
      */
     protected boolean compareOid( String oid1, String oid2 )
     {
@@ -829,9 +827,7 @@ public abstract class AbstractSchemaObje
 
 
     /**
-     * Copy a SchemaObject.
-     * 
-     * @return A copy of the current SchemaObject
+     * {@inheritDoc}
      */
     public SchemaObject copy( SchemaObject original )
     {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java Mon Oct  4 12:03:45 2010
@@ -210,7 +210,7 @@ public class AttributeType extends Abstr
      */
     private boolean buildSuperior( List<Throwable> errors, Registries registries )
     {
-        AttributeType superior = null;
+        AttributeType currentSuperior = null;
         AttributeTypeRegistry attributeTypeRegistry = registries.getAttributeTypeRegistry();
 
         if ( superiorOid != null )
@@ -218,7 +218,7 @@ public class AttributeType extends Abstr
             // This AT has a superior
             try
             {
-                superior = attributeTypeRegistry.lookup( superiorOid );
+                currentSuperior = attributeTypeRegistry.lookup( superiorOid );
             }
             catch ( Exception e )
             {
@@ -233,12 +233,12 @@ public class AttributeType extends Abstr
                 return false;
             }
 
-            if ( superior != null )
+            if ( currentSuperior != null )
             {
                 // a special case : if the superior is collective, this is an error
-                if ( superior.isCollective )
+                if ( currentSuperior.isCollective )
                 {
-                    String msg = I18n.err( I18n.ERR_04482_CANNOT_SUBTYPE_COLLECTIVE, superior, getName() );
+                    String msg = I18n.err( I18n.ERR_04482_CANNOT_SUBTYPE_COLLECTIVE, currentSuperior, getName() );
 
                     Throwable error = new LdapProtocolErrorException( msg );
                     errors.add( error );
@@ -246,20 +246,20 @@ public class AttributeType extends Abstr
                     return false;
                 }
 
-                this.superior = superior;
+                this.superior = currentSuperior;
 
                 // Recursively update the superior if not already done. We don't recurse
                 // if the superior's superior is not null, as it means it has already been
                 // handled.
-                if ( superior.getSuperior() == null )
+                if ( currentSuperior.getSuperior() == null )
                 {
-                    registries.buildReference( errors, superior );
+                    registries.buildReference( errors, currentSuperior );
                 }
 
                 // Update the descendant MAP
                 try
                 {
-                    attributeTypeRegistry.registerDescendants( this, superior );
+                    attributeTypeRegistry.registerDescendants( this, currentSuperior );
                 }
                 catch ( LdapException ne )
                 {
@@ -271,7 +271,7 @@ public class AttributeType extends Abstr
                 // Check for cycles now
                 Set<String> superiors = new HashSet<String>();
                 superiors.add( oid );
-                AttributeType tmp = superior;
+                AttributeType tmp = currentSuperior;
                 boolean isOk = true;
 
                 while ( tmp != null )
@@ -328,11 +328,11 @@ public class AttributeType extends Abstr
     {
         if ( syntaxOid != null )
         {
-            LdapSyntax syntax = null;
+            LdapSyntax currentSyntax = null;
 
             try
             {
-                syntax = registries.getLdapSyntaxRegistry().lookup( syntaxOid );
+                currentSyntax = registries.getLdapSyntaxRegistry().lookup( syntaxOid );
             }
             catch ( LdapException ne )
             {
@@ -345,10 +345,10 @@ public class AttributeType extends Abstr
                 return;
             }
 
-            if ( syntax != null )
+            if ( currentSyntax != null )
             {
                 // Update the Syntax reference
-                this.syntax = syntax;
+                this.syntax = currentSyntax;
             }
             else
             {
@@ -391,11 +391,11 @@ public class AttributeType extends Abstr
         // The equality MR. It can be null
         if ( equalityOid != null )
         {
-            MatchingRule equality = null;
+            MatchingRule currentEquality = null;
 
             try
             {
-                equality = registries.getMatchingRuleRegistry().lookup( equalityOid );
+                currentEquality = registries.getMatchingRuleRegistry().lookup( equalityOid );
             }
             catch ( LdapException ne )
             {
@@ -408,9 +408,9 @@ public class AttributeType extends Abstr
                 return;
             }
 
-            if ( equality != null )
+            if ( currentEquality != null )
             {
-                this.equality = equality;
+                this.equality = currentEquality;
             }
             else
             {
@@ -441,11 +441,11 @@ public class AttributeType extends Abstr
     {
         if ( orderingOid != null )
         {
-            MatchingRule ordering = null;
+            MatchingRule currentOrdering = null;
 
             try
             {
-                ordering = registries.getMatchingRuleRegistry().lookup( orderingOid );
+                currentOrdering = registries.getMatchingRuleRegistry().lookup( orderingOid );
             }
             catch ( LdapException ne )
             {
@@ -458,9 +458,9 @@ public class AttributeType extends Abstr
                 return;
             }
 
-            if ( ordering != null )
+            if ( currentOrdering != null )
             {
-                this.ordering = ordering;
+                this.ordering = currentOrdering;
             }
             else
             {
@@ -492,11 +492,11 @@ public class AttributeType extends Abstr
         // The Substring MR. It can be null
         if ( substringOid != null )
         {
-            MatchingRule substring = null;
+            MatchingRule currentSubstring = null;
 
             try
             {
-                substring = registries.getMatchingRuleRegistry().lookup( substringOid );
+                currentSubstring = registries.getMatchingRuleRegistry().lookup( substringOid );
             }
             catch ( LdapException ne )
             {
@@ -509,9 +509,9 @@ public class AttributeType extends Abstr
                 return;
             }
 
-            if ( substring != null )
+            if ( currentSubstring != null )
             {
-                this.substring = substring;
+                this.substring = currentSubstring;
             }
             else
             {
@@ -600,14 +600,10 @@ public class AttributeType extends Abstr
 
 
     /**
-     * Inject the attributeType into the registries, updating the references to
-     * other SchemaObject.
+     * {@inheritDoc}
      *
      * If one of the referenced SchemaObject does not exist (SUP, EQUALITY, ORDERING, SUBSTR, SYNTAX),
      * an exception is thrown.
-     *
-     * @param registries The Registries
-     * @exception If the AttributeType is not valid
      */
     public void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
@@ -681,14 +677,10 @@ public class AttributeType extends Abstr
 
 
     /**
-     * Remove the attributeType from the registries, updating the references to
-     * other SchemaObject.
+     * {@inheritDoc}
      *
      * If one of the referenced SchemaObject does not exist (SUP, EQUALITY, ORDERING, SUBSTR, SYNTAX),
      * an exception is thrown.
-     *
-     * @param registries The Registries
-     * @exception If the AttributeType is not valid
      */
     public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
@@ -781,9 +773,9 @@ public class AttributeType extends Abstr
     /**
      * Tells if this AttributeType can be modified by a user or not
      *
-     * @param canUserModify The flag to set
+     * @param userModifiable The flag to set
      */
-    public void setUserModifiable( boolean canUserModify )
+    public void setUserModifiable( boolean userModifiable )
     {
         if ( locked )
         {
@@ -792,7 +784,7 @@ public class AttributeType extends Abstr
 
         if ( !isReadOnly )
         {
-            this.canUserModify = canUserModify;
+            this.canUserModify = userModifiable;
         }
     }
 
@@ -890,16 +882,16 @@ public class AttributeType extends Abstr
      * </ul>
      * 
      * @see UsageEnum
-     * @param usage The AttributeType usage
+     * @param newUsage The AttributeType usage
      */
-    public void updateUsage( UsageEnum usage )
+    public void updateUsage( UsageEnum newUsage )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
 
-        this.usage = usage;
+        this.usage = newUsage;
     }
 
 
@@ -1016,9 +1008,9 @@ public class AttributeType extends Abstr
     /**
      * Sets the superior oid for this AttributeType
      *
-     * @param superiorOid The superior oid for this AttributeType
+     * @param newSuperiorOid The superior oid for this AttributeType
      */
-    public void setSuperior( String superiorOid )
+    public void setSuperior( String newSuperiorOid )
     {
         if ( locked )
         {
@@ -1027,7 +1019,7 @@ public class AttributeType extends Abstr
 
         if ( !isReadOnly )
         {
-            this.superiorOid = superiorOid;
+            this.superiorOid = newSuperiorOid;
         }
     }
 
@@ -1035,17 +1027,17 @@ public class AttributeType extends Abstr
     /**
      * Update the associated Superior AttributeType, even if the SchemaObject is readOnly
      *
-     * @param superior The superior for this AttributeType
+     * @param newSuperior The superior for this AttributeType
      */
-    public void updateSuperior( AttributeType superior )
+    public void updateSuperior( AttributeType newSuperior )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
 
-        this.superior = superior;
-        this.superiorOid = superior.getOid();
+        this.superior = newSuperior;
+        this.superiorOid = newSuperior.getOid();
     }
 
 
@@ -1131,17 +1123,17 @@ public class AttributeType extends Abstr
     /**
      * Update the associated Syntax, even if the SchemaObject is readOnly
      *
-     * @param syntax The Syntax for this AttributeType
+     * @param newSyntax The Syntax for this AttributeType
      */
-    public void updateSyntax( LdapSyntax syntax )
+    public void updateSyntax( LdapSyntax newSyntax )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
 
-        this.syntax = syntax;
-        this.syntaxOid = syntax.getOid();
+        this.syntax = newSyntax;
+        this.syntaxOid = newSyntax.getOid();
     }
 
 
@@ -1227,17 +1219,17 @@ public class AttributeType extends Abstr
     /**
      * Update the associated Equality MatchingRule, even if the SchemaObject is readOnly
      *
-     * @param equality The Equality MR for this AttributeType
+     * @param newEquality The Equality MR for this AttributeType
      */
-    public void updateEquality( MatchingRule equality )
+    public void updateEquality( MatchingRule newEquality )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
 
-        this.equality = equality;
-        this.equalityOid = equality.getOid();
+        this.equality = newEquality;
+        this.equalityOid = newEquality.getOid();
     }
 
 
@@ -1323,17 +1315,17 @@ public class AttributeType extends Abstr
     /**
      * Update the associated Ordering MatchingRule, even if the SchemaObject is readOnly
      *
-     * @param ordering The Ordering MR for this AttributeType
+     * @param newOrdering The Ordering MR for this AttributeType
      */
-    public void updateOrdering( MatchingRule ordering )
+    public void updateOrdering( MatchingRule newOrdering )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
 
-        this.ordering = ordering;
-        this.orderingOid = ordering.getOid();
+        this.ordering = newOrdering;
+        this.orderingOid = newOrdering.getOid();
     }
 
 
@@ -1419,17 +1411,17 @@ public class AttributeType extends Abstr
     /**
      * Update the associated Substring MatchingRule, even if the SchemaObject is readOnly
      *
-     * @param substring The Substr MR for this AttributeType
+     * @param newSubstring The Substr MR for this AttributeType
      */
-    public void updateSubstring( MatchingRule substring )
+    public void updateSubstring( MatchingRule newSubstring )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
 
-        this.substring = substring;
-        this.substringOid = substring.getOid();
+        this.substring = newSubstring;
+        this.substringOid = newSubstring.getOid();
     }
 
 
@@ -1495,7 +1487,7 @@ public class AttributeType extends Abstr
 
 
     /**
-     * @see Object#toString()
+     * {@inheritDoc}
      */
     public String toString()
     {
@@ -1504,7 +1496,7 @@ public class AttributeType extends Abstr
 
 
     /**
-     * Copy an AttributeType
+     * {@inheritDoc}
      */
     public AttributeType copy()
     {
@@ -1570,7 +1562,7 @@ public class AttributeType extends Abstr
 
 
     /**
-     * @see Object#equals(Object)
+     * {@inheritDoc}
      */
     public boolean equals( Object o )
     {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java Mon Oct  4 12:03:45 2010
@@ -97,8 +97,9 @@ public class LdapSyntax extends Abstract
 
     /**
      * Creates a Syntax object using a unique OID.
-     * 
-     * @param oid the OID for this Syntax
+     *
+     * @param oid the OID for this syntax
+     * @param description the description for this syntax
      */
     public LdapSyntax( String oid, String description )
     {
@@ -109,8 +110,10 @@ public class LdapSyntax extends Abstract
 
     /**
      * Creates a Syntax object using a unique OID.
-     * 
-     * @param oid the OID for this Syntax
+     *
+     * @param oid the OID for this syntax
+     * @param description the description for this syntax
+     * @param isHumanReadable true if this syntax is human readable
      */
     public LdapSyntax( String oid, String description, boolean isHumanReadable )
     {
@@ -134,9 +137,9 @@ public class LdapSyntax extends Abstract
     /**
      * Sets the human readable flag value.
      * 
-     * @param isHumanReadable the human readable flag value to set
+     * @param humanReadable the human readable flag value to set
      */
-    public void setHumanReadable( boolean isHumanReadable )
+    public void setHumanReadable( boolean humanReadable )
     {
         if ( locked )
         {
@@ -145,7 +148,7 @@ public class LdapSyntax extends Abstract
         
         if ( !isReadOnly )
         {
-            this.isHumanReadable = isHumanReadable;
+            this.isHumanReadable = humanReadable;
         }
     }
 
@@ -184,22 +187,23 @@ public class LdapSyntax extends Abstract
     /**
      * Update the associated SyntaxChecker, even if the SchemaObject is readOnly
      *
-     * @param syntaxChecker The associated SyntaxChecker
+     * @param newSyntaxChecker The associated SyntaxChecker
      */
-    public void updateSyntaxChecker( SyntaxChecker syntaxChecker )
+    public void updateSyntaxChecker( SyntaxChecker newSyntaxChecker )
     {
         if ( locked )
         {
             throw new UnsupportedOperationException( I18n.err( I18n.ERR_04441, getName() ) );
         }
         
-        this.syntaxChecker = syntaxChecker;
+        this.syntaxChecker = newSyntaxChecker;
     }
 
 
     /**
-     * @see Object#toString()
+     * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         return objectType + " " + DescriptionUtils.getDescription( this );
@@ -207,11 +211,7 @@ public class LdapSyntax extends Abstract
 
 
     /**
-     * Inject the Syntax into the registries, updating the references to
-     * other SchemaObject
-     *
-     * @param registries The Registries
-     * @exception If the addition failed
+     * {@inheritDoc}
      */
     public void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException
     {
@@ -239,14 +239,7 @@ public class LdapSyntax extends Abstract
     
     
     /**
-     * Remove the SDyntax from the registries, updating the references to
-     * other SchemaObject.
-     * 
-     * If one of the referenced SchemaObject does not exist (), 
-     * an exception is thrown.
-     *
-     * @param registries The Registries
-     * @exception If the Syntx is not valid 
+     * {@inheritDoc}
      */
     @SuppressWarnings("PMD.CollapsibleIfStatements") // Used because of comments
     public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
@@ -266,7 +259,7 @@ public class LdapSyntax extends Abstract
 
 
     /**
-     * Copy a LdapSyntax
+     * {@inheritDoc}
      */
     public LdapSyntax copy()
     {
@@ -286,7 +279,7 @@ public class LdapSyntax extends Abstract
 
 
     /**
-     * @see Object#equals()
+     * {@inheritDoc}
      */
     @Override
     public boolean equals( Object o )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaObject.java Mon Oct  4 12:03:45 2010
@@ -110,18 +110,20 @@ public interface SchemaObject extends Se
      * Inject this SchemaObject into the given registries, updating the references to
      * other SchemaObject
      *
-     * @param errors The errors we got
-     * @param registries The Registries
+     * @param errors the errors we got
+     * @param registries the registries
+     * @throws LdapException if one of the referenced schema objects does not exist
      */
     void addToRegistries( List<Throwable> errors, Registries registries ) throws LdapException;
 
 
     /**
      * Remove this SchemaObject from the given registries, updating the references to
-     * other SchemaObject
+     * other SchemaObject.
      *
-     * @param errors The errors we got
-     * @param registries The Registries
+     * @param errors the errors we got
+     * @param registries The registries
+     * @throws LdapException if one of the referenced schema objects does not exist
      */
     void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException;
 
@@ -294,13 +296,13 @@ public interface SchemaObject extends Se
 
 
     /**
-     * @see Object#hashCode()
+     * {@inheritDoc}
      */
     int hashCode();
 
 
     /**
-     * @see Object#equals(Object)
+     * {@inheritDoc}
      */
     boolean equals( Object o1 );
 
@@ -324,9 +326,10 @@ public interface SchemaObject extends Se
 
 
     /**
-     * Copy a SchemaObject.
-     * 
-     * @return A copy of the current SchemaObject
+     * Copies the given schema object into this schema object.
+     *
+     * @param original the original SchemaObject
+     * @return this
      */
     SchemaObject copy( SchemaObject original );
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AbstractSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AbstractSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AbstractSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AbstractSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -49,6 +49,9 @@ public abstract class AbstractSchemaPars
     protected ReusableAntlrSchemaLexer lexer;
 
 
+    /**
+     * Instantiates a new abstract schema parser.
+     */
     protected AbstractSchemaParser()
     {
         lexer = new ReusableAntlrSchemaLexer( new StringReader( "" ) );
@@ -59,6 +62,8 @@ public abstract class AbstractSchemaPars
     /**
      * Initializes the plumbing by creating a pipe and coupling the parser/lexer
      * pair with it. param spec the specification to be parsed
+     *
+     * @param spec the spec
      */
     protected void reset( String spec )
     {
@@ -71,12 +76,12 @@ public abstract class AbstractSchemaPars
     /**
      * Sets the parser monitor.
      * 
-     * @param monitor the new parser monitor
+     * @param parserMonitor the new parser monitor
      */
-    public void setParserMonitor( ParserMonitor monitor )
+    public void setParserMonitor( ParserMonitor parserMonitor )
     {
-        this.monitor = monitor;
-        parser.setParserMonitor( monitor );
+        this.monitor = parserMonitor;
+        parser.setParserMonitor( parserMonitor );
     }
 
 
@@ -116,12 +121,13 @@ public abstract class AbstractSchemaPars
     
     
     /**
-     * Update the schemaName for this SchemaObject, accordingly to the X-SCHEMA parameter. If
+     * Update the schemaName for the given SchemaObject, accordingly to the X-SCHEMA parameter. If
      * not present, default to 'other'
+     *
+     * @param schemaObject the schema object where the name should be updated
      */
-    protected void setSchemaName( SchemaObject schemaObject )
+    protected static void updateSchemaName( SchemaObject schemaObject )
     {
-        
         // Update the Schema if we have the X-SCHEMA extension
         List<String> schemaExtension = schemaObject.getExtensions().get( MetaSchemaConstants.X_SCHEMA );
         

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -102,7 +102,7 @@ public class AttributeTypeDescriptionSch
             AttributeType attributeType = parser.attributeTypeDescription();
             
             // Update the schemaName
-            setSchemaName( attributeType );
+            updateSchemaName( attributeType );
 
             return attributeType;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -87,7 +87,7 @@ public class DITContentRuleDescriptionSc
             DITContentRule ditContentRule = parser.ditContentRuleDescription();
             
             // Update the schemaName
-            setSchemaName( ditContentRule );
+            updateSchemaName( ditContentRule );
 
             return ditContentRule;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -91,7 +91,7 @@ public class DITStructureRuleDescription
             DITStructureRule ditStructureRule = parser.ditStructureRuleDescription();
 
             // Update the schemaName
-            setSchemaName( ditStructureRule );
+            updateSchemaName( ditStructureRule );
 
             return ditStructureRule;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -95,7 +95,7 @@ public class LdapComparatorDescriptionSc
                 
 
                 // Update the schemaName
-                setSchemaName( ldapComparatorDescription );
+                updateSchemaName( ldapComparatorDescription );
 
                 return ldapComparatorDescription;
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -82,7 +82,7 @@ public class LdapSyntaxDescriptionSchema
             ldapSyntax.setSpecification( ldapSyntaxDescription );
 
             // Update the schemaName
-            setSchemaName( ldapSyntax );
+            updateSchemaName( ldapSyntax );
                 
             return ldapSyntax;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -87,7 +87,7 @@ public class MatchingRuleDescriptionSche
             MatchingRule matchingRule = parser.matchingRuleDescription();
             
             // Update the schemaName
-            setSchemaName( matchingRule );
+            updateSchemaName( matchingRule );
 
             return matchingRule;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -88,7 +88,7 @@ public class MatchingRuleUseDescriptionS
             MatchingRuleUse matchingRuleUse = parser.matchingRuleUseDescription();
             
             // Update the schemaName
-            setSchemaName( matchingRuleUse );
+            updateSchemaName( matchingRuleUse );
 
             return matchingRuleUse;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -86,7 +86,7 @@ public class NameFormDescriptionSchemaPa
             NameForm nameForm = parser.nameFormDescription();
             
             // Update the schemaName
-            setSchemaName( nameForm );
+            updateSchemaName( nameForm );
 
             return nameForm;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -92,7 +92,7 @@ public class NormalizerDescriptionSchema
             NormalizerDescription normalizer = parser.normalizerDescription();
 
             // Update the schemaName
-            setSchemaName( normalizer );
+            updateSchemaName( normalizer );
 
             return normalizer;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -94,7 +94,7 @@ public class ObjectClassDescriptionSchem
             ObjectClass objectClass = parser.objectClassDescription();
 
             // Update the schemaName
-            setSchemaName( objectClass );
+            updateSchemaName( objectClass );
 
             return objectClass;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -166,14 +166,14 @@ public class OpenLdapSchemaParser extend
             {
                 objectClass.setOid( getResolveOid( objectClass.getOid() ) );
             }
-            
+
             // apply object identifier macros to attribute types
             for ( AttributeType attributeType : attributeTypes )
             {
                 attributeType.setOid( getResolveOid( attributeType.getOid() ) );
                 attributeType.setSyntaxOid( getResolveOid( attributeType.getSyntaxOid() ) );
             }
-            
+
         }
     }
 
@@ -194,8 +194,6 @@ public class OpenLdapSchemaParser extend
     }
 
 
-    // False positive
-    @SuppressWarnings("PMD.EmptyIfStmt")
     private void resolveObjectIdentifierMacro( OpenLdapObjectIdentifierMacro macro ) throws ParseException
     {
         String rawOidOrNameSuffix = macro.getRawOidOrNameSuffix();
@@ -203,6 +201,7 @@ public class OpenLdapSchemaParser extend
         if ( macro.isResolved() )
         {
             // finished
+            return;
         }
         else if ( rawOidOrNameSuffix.indexOf( ':' ) != -1 )
         {
@@ -241,7 +240,7 @@ public class OpenLdapSchemaParser extend
      * Parses an OpenLDAP schemaObject element/object.
      *
      * @param schemaObject the String image of a complete schema object
-     * @throws IOException If the schemaObject can't be transformed to a byteArrayInputStream
+     * @return the schema object
      * @throws ParseException If the schemaObject can't be parsed
      */
     public SchemaObject parse( String schemaObject ) throws ParseException
@@ -340,11 +339,11 @@ public class OpenLdapSchemaParser extend
     /**
      * Sets if object identifier macros should be resolved.
      * 
-     * @param isResolveObjectIdentifierMacros true if object identifier macros should be resolved
+     * @param resolveObjectIdentifierMacros true if object identifier macros should be resolved
      */
-    public void setResolveObjectIdentifierMacros( boolean isResolveObjectIdentifierMacros )
+    public void setResolveObjectIdentifierMacros( boolean resolveObjectIdentifierMacros )
     {
-        this.isResolveObjectIdentifierMacros = isResolveObjectIdentifierMacros;
+        this.isResolveObjectIdentifierMacros = resolveObjectIdentifierMacros;
     }
 
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java Mon Oct  4 12:03:45 2010
@@ -91,7 +91,7 @@ public class SyntaxCheckerDescriptionSch
             SyntaxCheckerDescription syntaxChecker = parser.syntaxCheckerDescription();
 
             // Update the schemaName
-            setSchemaName( syntaxChecker );
+            updateSchemaName( syntaxChecker );
 
             return syntaxChecker;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AbstractSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AbstractSchemaLoader.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AbstractSchemaLoader.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AbstractSchemaLoader.java Mon Oct  4 12:03:45 2010
@@ -44,6 +44,8 @@ import org.apache.directory.shared.ldap.
  */
 public abstract class AbstractSchemaLoader implements SchemaLoader
 {
+    
+    /** The listener. */
     protected SchemaLoaderListener listener;
 
     /** 
@@ -54,12 +56,21 @@ public abstract class AbstractSchemaLoad
     protected final Map<String, Schema> schemaMap = new HashMap<String, Schema>();
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setListener( SchemaLoaderListener listener )
     {
         this.listener = listener;
     }
 
 
+    /**
+     * Notify listener or registries.
+     *
+     * @param schema the schema
+     * @param registries the registries
+     */
     protected final void notifyListenerOrRegistries( Schema schema, Registries registries )
     {
         if ( listener != null )
@@ -69,8 +80,7 @@ public abstract class AbstractSchemaLoad
 
         if ( registries != listener )
         {
-            SchemaLoaderListener listener = registries;
-            listener.schemaLoaded( schema );
+            registries.schemaLoaded( schema );
         }
     }
 
@@ -130,6 +140,13 @@ public abstract class AbstractSchemaLoad
     }
 
 
+    /**
+     * Gets the schema.
+     *
+     * @param entry the entry
+     * @return the schema
+     * @throws Exception the exception
+     */
     protected Schema getSchema( Entry entry ) throws Exception
     {
         if ( entry == null )
@@ -199,6 +216,7 @@ public abstract class AbstractSchemaLoad
         };
     }
 
+    // TODO: clean commented code
 
     /*
      * {@inheritDoc}
@@ -609,6 +627,7 @@ public abstract class AbstractSchemaLoad
     }
     */
 
+    // TODO: is this used?
     public Object getDao()
     {
         return null;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchema.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchema.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchema.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchema.java Mon Oct  4 12:03:45 2010
@@ -147,12 +147,12 @@ public class DefaultSchema implements Sc
     /**
      * {@inheritDoc}
      */
-    public void addDependencies( String... dependencies )
+    public void addDependencies( String... dependenciesToAdd )
     {
-        if ( dependencies != null )
+        if ( dependenciesToAdd != null )
         {
-            this.dependencies = new String[dependencies.length];
-            System.arraycopy( this.dependencies, 0, dependencies, 0, dependencies.length );
+            this.dependencies = new String[dependenciesToAdd.length];
+            System.arraycopy( this.dependencies, 0, dependenciesToAdd, 0, dependenciesToAdd.length );
         }
     }
 
@@ -221,8 +221,9 @@ public class DefaultSchema implements Sc
     
 
     /**
-     * @see Object#toString()
+     * {@inheritDoc}
      */
+    @Override
     public String toString()
     {
         StringBuilder sb = new StringBuilder( "\tSchema Name: " );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/subtree/SubtreeSpecificationModifier.java Mon Oct  4 12:03:45 2010
@@ -41,10 +41,10 @@ public class SubtreeSpecificationModifie
     private DN base = new DN();
 
     /** the set of subordinates entries and their subordinates to exclude */
-    private Set<DN> chopBefore = Collections.EMPTY_SET;
+    private Set<DN> chopBefore = Collections.emptySet();
 
     /** the set of subordinates entries whose subordinates are to be excluded */
-    private Set<DN> chopAfter = Collections.EMPTY_SET;
+    private Set<DN> chopAfter = Collections.emptySet();
 
     /** the minimum distance below base to start including entries */
     private int minBaseDistance = 0;
@@ -96,13 +96,13 @@ public class SubtreeSpecificationModifie
     /**
      * Sets the set of subordinates entries and their subordinates to exclude.
      * 
-     * @param chopBefore
+     * @param chopBeforeExclusions
      *            the set of subordinates entries and their subordinates to
      *            exclude
      */
-    public void setChopBeforeExclusions( Set<DN> chopBefore )
+    public void setChopBeforeExclusions( Set<DN> chopBeforeExclusions )
     {
-        this.chopBefore = chopBefore;
+        this.chopBefore = chopBeforeExclusions;
     }
 
 
@@ -110,13 +110,13 @@ public class SubtreeSpecificationModifie
      * Sets the set of subordinates entries whose subordinates are to be
      * excluded.
      * 
-     * @param chopAfter
+     * @param chopAfterExclusions
      *            the set of subordinates entries whose subordinates are to be
      *            excluded
      */
-    public void setChopAfterExclusions( Set<DN> chopAfter )
+    public void setChopAfterExclusions( Set<DN> chopAfterExclusions )
     {
-        this.chopAfter = chopAfter;
+        this.chopAfter = chopAfterExclusions;
     }
 
 
@@ -160,12 +160,14 @@ public class SubtreeSpecificationModifie
      * Sets a filter using only assertions on objectClass attributes for subtree
      * refinement.
      * 
-     * @param filter a filter using only assertions on objectClass attributes for
+     * TODO: there is a setFilter() method, remove this method?
+     * 
+     * @param refinement a filter using only assertions on objectClass attributes for
      *            subtree refinement
      */
-    public void setRefinement( ExprNode filter )
+    public void setRefinement( ExprNode refinement )
     {
-        this.filter = filter;
+        this.filter = refinement;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/GeneralizedTime.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/GeneralizedTime.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/GeneralizedTime.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/GeneralizedTime.java Mon Oct  4 12:03:45 2010
@@ -111,23 +111,49 @@ import org.apache.directory.shared.i18n.
 public class GeneralizedTime implements Comparable<GeneralizedTime>
 {
 
+    /**
+     * The format of the generalized time.
+     */
     public enum Format
     {
-        YEAR_MONTH_DAY_HOUR_MIN_SEC, YEAR_MONTH_DAY_HOUR_MIN_SEC_FRACTION,
-
-        YEAR_MONTH_DAY_HOUR_MIN, YEAR_MONTH_DAY_HOUR_MIN_FRACTION,
-
-        YEAR_MONTH_DAY_HOUR, YEAR_MONTH_DAY_HOUR_FRACTION, ;
+        /** Time format with minutes and seconds, excluding fraction. */
+        YEAR_MONTH_DAY_HOUR_MIN_SEC,
+        /** Time format with minutes and seconds, including fraction. */
+        YEAR_MONTH_DAY_HOUR_MIN_SEC_FRACTION,
+
+        /** Time format with minutes, seconds are omitted, excluding fraction. */
+        YEAR_MONTH_DAY_HOUR_MIN,
+        /** Time format with minutes seconds are omitted, including fraction. */
+        YEAR_MONTH_DAY_HOUR_MIN_FRACTION,
+
+        /** Time format, minutes and seconds are omitted, excluding fraction. */
+        YEAR_MONTH_DAY_HOUR,
+        /** Time format, minutes and seconds are omitted, including fraction. */
+        YEAR_MONTH_DAY_HOUR_FRACTION, ;
     }
 
+    /**
+     * The fraction delimiter of the generalized time.
+     */
     public enum FractionDelimiter
     {
-        DOT, COMMA
+        /** Use a dot as fraction delimiter. */
+        DOT,
+        /** Use a comma as fraction delimiter. */
+        COMMA
     }
 
+    /**
+     * The time zone format of the generalized time.
+     */
     public enum TimeZoneFormat
     {
-        Z, DIFF_HOUR, DIFF_HOUR_MINUTE;
+        /** g-time-zone (Zulu) format. */
+        Z,
+        /** g-differential format, using hour only. */
+        DIFF_HOUR,
+        /** g-differential format, using hour and minute. */
+        DIFF_HOUR_MINUTE;
     }
 
     private static final TimeZone GMT = TimeZone.getTimeZone( "GMT" );
@@ -591,10 +617,10 @@ public class GeneralizedTime implements 
     public String toGeneralizedTime( Format format, FractionDelimiter fractionDelimiter, int fractionLength,
         TimeZoneFormat timeZoneFormat )
     {
-        Calendar calendar = ( Calendar ) this.calendar.clone();
+        Calendar clonedCalendar = ( Calendar ) this.calendar.clone();
         if ( timeZoneFormat == TimeZoneFormat.Z )
         {
-            calendar.setTimeZone( GMT );
+            clonedCalendar.setTimeZone( GMT );
         }
 
         NumberFormat twoDigits = new DecimalFormat( "00" );
@@ -606,36 +632,36 @@ public class GeneralizedTime implements 
         }
 
         StringBuilder sb = new StringBuilder();
-        sb.append( fourDigits.format( calendar.get( Calendar.YEAR ) ) );
-        sb.append( twoDigits.format( calendar.get( Calendar.MONTH ) + 1 ) );
-        sb.append( twoDigits.format( calendar.get( Calendar.DAY_OF_MONTH ) ) );
-        sb.append( twoDigits.format( calendar.get( Calendar.HOUR_OF_DAY ) ) );
+        sb.append( fourDigits.format( clonedCalendar.get( Calendar.YEAR ) ) );
+        sb.append( twoDigits.format( clonedCalendar.get( Calendar.MONTH ) + 1 ) );
+        sb.append( twoDigits.format( clonedCalendar.get( Calendar.DAY_OF_MONTH ) ) );
+        sb.append( twoDigits.format( clonedCalendar.get( Calendar.HOUR_OF_DAY ) ) );
 
         switch ( format )
         {
             case YEAR_MONTH_DAY_HOUR_MIN_SEC:
-                sb.append( twoDigits.format( calendar.get( Calendar.MINUTE ) ) );
-                sb.append( twoDigits.format( calendar.get( Calendar.SECOND ) ) );
+                sb.append( twoDigits.format( clonedCalendar.get( Calendar.MINUTE ) ) );
+                sb.append( twoDigits.format( clonedCalendar.get( Calendar.SECOND ) ) );
                 break;
 
             case YEAR_MONTH_DAY_HOUR_MIN_SEC_FRACTION:
-                sb.append( twoDigits.format( calendar.get( Calendar.MINUTE ) ) );
-                sb.append( twoDigits.format( calendar.get( Calendar.SECOND ) ) );
+                sb.append( twoDigits.format( clonedCalendar.get( Calendar.MINUTE ) ) );
+                sb.append( twoDigits.format( clonedCalendar.get( Calendar.SECOND ) ) );
 
                 NumberFormat fractionDigits = new DecimalFormat( fractionFormat.toString() );
                 sb.append( fractionDelimiter == FractionDelimiter.COMMA ? ',' : '.' );
-                sb.append( fractionDigits.format( calendar.get( Calendar.MILLISECOND ) ) );
+                sb.append( fractionDigits.format( clonedCalendar.get( Calendar.MILLISECOND ) ) );
                 break;
 
             case YEAR_MONTH_DAY_HOUR_MIN:
-                sb.append( twoDigits.format( calendar.get( Calendar.MINUTE ) ) );
+                sb.append( twoDigits.format( clonedCalendar.get( Calendar.MINUTE ) ) );
                 break;
 
             case YEAR_MONTH_DAY_HOUR_MIN_FRACTION:
-                sb.append( twoDigits.format( calendar.get( Calendar.MINUTE ) ) );
+                sb.append( twoDigits.format( clonedCalendar.get( Calendar.MINUTE ) ) );
 
                 // sec + millis => fraction of minute
-                double millisec = 1000 * calendar.get( Calendar.SECOND ) + calendar.get( Calendar.MILLISECOND );
+                double millisec = 1000 * clonedCalendar.get( Calendar.SECOND ) + clonedCalendar.get( Calendar.MILLISECOND );
                 double fraction = millisec / ( 1000 * 60 );
                 fractionDigits = new DecimalFormat( "0." + fractionFormat );
                 sb.append( fractionDelimiter == FractionDelimiter.COMMA ? ',' : '.' );
@@ -644,8 +670,8 @@ public class GeneralizedTime implements 
 
             case YEAR_MONTH_DAY_HOUR_FRACTION:
                 // min + sec + millis => fraction of minute
-                millisec = 1000 * 60 * calendar.get( Calendar.MINUTE ) + 1000 * calendar.get( Calendar.SECOND )
-                    + calendar.get( Calendar.MILLISECOND );
+                millisec = 1000 * 60 * clonedCalendar.get( Calendar.MINUTE ) + 1000 * clonedCalendar.get( Calendar.SECOND )
+                    + clonedCalendar.get( Calendar.MILLISECOND );
                 fraction = millisec / ( 1000 * 60 * 60 );
                 fractionDigits = new DecimalFormat( "0." + fractionFormat );
                 sb.append( fractionDelimiter == FractionDelimiter.COMMA ? ',' : '.' );
@@ -654,13 +680,13 @@ public class GeneralizedTime implements 
                 break;
         }
 
-        if ( timeZoneFormat == TimeZoneFormat.Z && calendar.getTimeZone().hasSameRules( GMT ) )
+        if ( timeZoneFormat == TimeZoneFormat.Z && clonedCalendar.getTimeZone().hasSameRules( GMT ) )
         {
             sb.append( 'Z' );
         }
         else
         {
-            TimeZone timeZone = calendar.getTimeZone();
+            TimeZone timeZone = clonedCalendar.getTimeZone();
             int rawOffset = timeZone.getRawOffset();
             sb.append( rawOffset < 0 ? '-' : '+' );
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java?rev=1004214&r1=1004213&r2=1004214&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java Mon Oct  4 12:03:45 2010
@@ -1611,15 +1611,19 @@ public class LdapURL
 
 
     /**
-     * Compute the instance's hash code
-     * @return the instance's hash code 
+     * {@inheritDoc}
      */
+    @Override
     public int hashCode()
     {
         return this.toString().hashCode();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    @Override
     public boolean equals( Object obj )
     {
         if ( this == obj )
@@ -1833,13 +1837,13 @@ public class LdapURL
 
 
         /**
-         * Sets the critical.
+         * Sets the critical flag.
          * 
-         * @param isCritical the new critical
+         * @param critical the new critical flag
          */
-        public void setCritical( boolean isCritical )
+        public void setCritical( boolean critical )
         {
-            this.isCritical = isCritical;
+            this.isCritical = critical;
         }
 
 



Mime
View raw message