directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r946140 - in /directory/shared/trunk: ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/ ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/ ldap/src/main/java/org/apach...
Date Wed, 19 May 2010 12:02:20 GMT
Author: felixk
Date: Wed May 19 12:02:19 2010
New Revision: 946140

URL: http://svn.apache.org/viewvc?rev=946140&view=rev
Log:
Remove unused private/local variables/methods/constants or add SupressWarning with comment

Modified:
    directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
    directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
    directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.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/DefaultAttributeTypeRegistry.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java

Modified: directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
(original)
+++ directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
Wed May 19 12:02:19 2010
@@ -22,21 +22,17 @@ package org.apache.directory.shared.ldap
 
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.io.FileWriter;
 import java.io.FilenameFilter;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.schema.registries.AbstractSchemaLoader;
 import org.apache.directory.shared.ldap.schema.registries.Schema;
-import org.apache.directory.shared.ldap.util.DateUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -64,13 +60,6 @@ public class LdifSchemaLoader extends Ab
     /** Speedup for DEBUG mode */
     private static final boolean IS_DEBUG = LOG.isDebugEnabled();
 
-    /**
-     * the administrator DN - very ADS specific but we need some DN here for
-     * the modifiers name when the system modifies by itself enabled and 
-     * disabled schemas in the repository.
-     */
-    private static final String ADMIN_SYSTEM_DN = "uid=admin,ou=system";
-
     /** directory containing the schema LDIF file for ou=schema */
     private final File baseDirectory;
 
@@ -245,69 +234,6 @@ public class LdifSchemaLoader extends Ab
 
     
     /**
-     * Utility method used to enable a specific schema on disk in the LDIF
-     * based schema repository.  This method will remove the m-disabled AT
-     * in the schema file and update the modifiersName and modifyTimestamp.
-     * 
-     * The modifiersName and modifyTimestamp on the schema.ldif file will
-     * also be updated to indicate a change to the schema.
-     *
-     * @param schema the disabled schema to enable
-     * @throws Exception if there are problems writing changes back to disk
-     */
-    private void enableSchema( Schema schema ) throws Exception
-    {
-        // -------------------------------------------------------------------
-        // Modifying the foo schema foo.ldif file to be enabled but still
-        // have to now update the timestamps and update the modifiersName
-        // -------------------------------------------------------------------
-
-        File schemaLdifFile = new File( new File( baseDirectory, SchemaConstants.OU_SCHEMA
), "cn="
-            + schema.getSchemaName() + "." + LDIF_EXT );
-        LdifReader reader = new LdifReader( schemaLdifFile );
-        LdifEntry ldifEntry = reader.next();
-        Entry entry = ldifEntry.getEntry();
-
-        entry.removeAttributes( "changeType" );
-        entry.removeAttributes( SchemaConstants.MODIFIERS_NAME_AT );
-        entry.removeAttributes( SchemaConstants.MODIFY_TIMESTAMP_AT );
-        entry.removeAttributes( MetaSchemaConstants.M_DISABLED_AT );
-
-        entry.add( SchemaConstants.MODIFIERS_NAME_AT, ADMIN_SYSTEM_DN );
-        entry.add( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-
-        FileWriter out = new FileWriter( schemaLdifFile );
-        out.write( LdifUtils.convertEntryToLdif( entry ) );
-        out.flush();
-        out.close();
-
-        // -------------------------------------------------------------------
-        // Now we need to update the timestamp on the schema.ldif file which
-        // shows that something changed below the schema directory in schema
-        // -------------------------------------------------------------------
-
-        schemaLdifFile = new File( baseDirectory, "ou=schema." + LDIF_EXT );
-        reader = new LdifReader( schemaLdifFile );
-        ldifEntry = reader.next();
-        entry = ldifEntry.getEntry();
-
-        entry.removeAttributes( "changeType" );
-        entry.removeAttributes( SchemaConstants.MODIFIERS_NAME_AT );
-        entry.removeAttributes( SchemaConstants.MODIFY_TIMESTAMP_AT );
-
-        entry.add( SchemaConstants.MODIFIERS_NAME_AT, ADMIN_SYSTEM_DN );
-        entry.add( SchemaConstants.MODIFY_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
-
-        out = new FileWriter( schemaLdifFile );
-        out.write( LdifUtils.convertEntryToLdif( entry ) );
-        out.flush();
-        out.close();
-
-        reader.close();
-    }
-
-
-    /**
      * Utility method to get the file for a schema directory.
      *
      * @param schema the schema to get the file for

Modified: directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
(original)
+++ directory/shared/trunk/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
Wed May 19 12:02:19 2010
@@ -21,7 +21,6 @@ package org.apache.directory.shared.ldap
 
 
 import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -74,13 +73,6 @@ public class SchemaEntityFactory impleme
     /** Slf4j logger */
     private final static Logger LOG = LoggerFactory.getLogger( SchemaEntityFactory.class
);
 
-    /** for fast debug checks */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-    /** Used for looking up the setRegistries(Registries) method */
-    private final static Class<?>[] parameterTypes = new Class[]
-        { Registries.class };
-
     private static final List<String> EMPTY_LIST = new ArrayList<String>();
     private static final String[] EMPTY_ARRAY = new String[]
         {};
@@ -413,7 +405,7 @@ public class SchemaEntityFactory impleme
             // Ok, let's try with the constructor without argument.
             // In this case, we will have to check that the OID is the same than
             // the one we got in the Comparator entry
-            Constructor<?> constructor = clazz.getConstructor();
+            clazz.getConstructor();
             comparator = ( LdapComparator<?> ) clazz.newInstance();
 
             if ( !comparator.getOid().equals( oid ) )
@@ -645,42 +637,6 @@ public class SchemaEntityFactory impleme
 
 
     /**
-     * Uses reflection to see if a setRegistries( Registries ) method exists on the
-     * object's class.  If so then the registries are dependency injected into the 
-     * new schema object.
-     * 
-     * @param obj a schema object to have a Registries dependency injected.
-     */
-    private void injectRegistries( Object obj, Registries targetRegistries ) throws Exception
-    {
-        Method method = null;
-
-        try
-        {
-            method = obj.getClass().getMethod( "setRegistries", parameterTypes );
-        }
-        catch ( NoSuchMethodException e )
-        {
-            if ( IS_DEBUG )
-            {
-                LOG.debug( obj.getClass() + " has no setRegistries() method." );
-            }
-
-            return;
-        }
-
-        if ( method == null )
-        {
-            return;
-        }
-
-        Object[] args = new Object[]
-            { targetRegistries };
-        method.invoke( obj, args );
-    }
-
-
-    /**
      * {@inheritDoc}
      * @throws LdapInvalidAttributeValueException 
      * @throws LdapUnwillingToPerformException 

Modified: directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
(original)
+++ directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
Wed May 19 12:02:19 2010
@@ -258,25 +258,6 @@ public class DefaultSchemaManager implem
     }
 
     
-    /**
-     * Tells if there are schemaObjects for a given schema from the registries
-     */
-    private boolean hasSchemaObjects( Schema schema, Registries registries ) throws Exception
-    {
-        Map<String, Set<SchemaObjectWrapper>> schemaObjects = registries.getObjectBySchemaName();
-        Set<SchemaObjectWrapper> content = schemaObjects.get( StringTools.toLowerCase(
schema.getSchemaName() ) );
-
-        if ( ( content == null ) || content.isEmpty() )
-        {
-            return false;
-        }
-        else
-        {
-            return true;
-        }
-    }
-
-
     //-----------------------------------------------------------------------
     // API methods
     //-----------------------------------------------------------------------
@@ -692,6 +673,7 @@ public class DefaultSchemaManager implem
      * - isRelaxed
      * - disabledAccepted
      */
+    @SuppressWarnings("PMD.UnusedPrivateMethod") // False positive
     private boolean unload( Registries registries, Schema schema ) throws Exception
     {
         if ( schema == null )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
Wed May 19 12:02:19 2010
@@ -31,7 +31,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.codec.stateful.EncoderMonitor;
 import org.apache.directory.shared.asn1.codec.stateful.StatefulEncoder;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
 import org.apache.directory.shared.ldap.message.spi.Provider;
 import org.apache.directory.shared.ldap.message.spi.ProviderEncoder;
 import org.apache.directory.shared.ldap.message.spi.ProviderException;
@@ -287,47 +286,4 @@ public class LdapEncoder implements Prov
             this.channel = Channels.newChannel( out );
         }
     }
-    
-    
-    private static ByteBuffer encodeAsn1( AddRequestCodec addRequest )
-    {
-        //int length = computeLength( addRequest );
-        return null;
-    }
-    
-    
-    private static ByteBuffer encodeAsn1( LdapMessageCodec message ) throws EncoderException
-    {
-        ByteBuffer buffer = null;
-        
-        switch ( message.getMessageType() )
-        {
-            case ABANDON_REQUEST :
-                return encodeAsn1( message );
-                
-            case ADD_REQUEST :
-            case ADD_RESPONSE :
-            case BIND_REQUEST :
-            case BIND_RESPONSE :
-            case COMPARE_REQUEST :
-            case COMPARE_RESPONSE :
-            case DEL_REQUEST :
-            case DEL_RESPONSE :
-            case EXTENDED_REQUEST :
-            case EXTENDED_RESPONSE :
-            case INTERMEDIATE_RESPONSE :
-            case MODIFY_REQUEST :
-            case MODIFY_RESPONSE :
-            case MODIFYDN_REQUEST :
-            case MODIFYDN_RESPONSE :
-            case SEARCH_REQUEST :
-            case SEARCH_RESULT_DONE :
-            case SEARCH_RESULT_ENTRY :
-            case SEARCH_RESULT_REFERENCE  :
-            case UNBIND_REQUEST :
-            
-        }
-        
-        return buffer;
-    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
Wed May 19 12:02:19 2010
@@ -34,14 +34,12 @@ import org.apache.directory.shared.i18n.
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
-import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
+import org.apache.directory.shared.ldap.entry.DefaultModification;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.name.DN;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -73,12 +71,6 @@ import org.slf4j.LoggerFactory;
  */
 public class ModifyRequestCodec extends LdapMessageCodec
 {
-    // ~ Static fields/initializers
-    // -----------------------------------------------------------------
-
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( ModifyRequestCodec.class );
-
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
Wed May 19 12:02:19 2010
@@ -213,7 +213,6 @@ public class FilterParser
      */
     private static Value<?> parseAssertionValue( String filter, Position pos, boolean
preserveEscapedChars ) throws ParseException
     {
-        int start = pos.start;
         char c = StringTools.charAt( filter, pos.start );
         
         // Create a buffer big enough to contain the value once converted

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
Wed May 19 12:02:19 2010
@@ -33,8 +33,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.message.internal.InternalModifyResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
 import org.apache.directory.shared.ldap.name.DN;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -47,9 +45,6 @@ public class ModifyRequestImpl extends A
 {
     static final long serialVersionUID = -505803669028990304L;
 
-    /** The logger */
-    private static final transient Logger LOG = LoggerFactory.getLogger( ModifyRequestImpl.class
);
-
     /** Dn of the entry to modify or PDU's <b>object</b> field */
     private DN name;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java
Wed May 19 12:02:19 2010
@@ -153,8 +153,8 @@ public class AVASerializer
     public static AVA deserialize( ObjectInput in ) throws IOException
     {
         String upName = in.readUTF();
-        int start = in.readInt();
-        int length = in.readInt();
+        in.readInt(); // start
+        in.readInt(); // length
         String upType = in.readUTF();
         String normType = in.readUTF();
         

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
Wed May 19 12:02:19 2010
@@ -696,6 +696,7 @@ public class DITContentRule extends Abst
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
Wed May 19 12:02:19 2010
@@ -254,6 +254,7 @@ public class DITStructureRule extends Ab
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
Wed May 19 12:02:19 2010
@@ -282,6 +282,7 @@ public class MatchingRuleUse extends Abs
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
Wed May 19 12:02:19 2010
@@ -516,6 +516,7 @@ public class NameForm extends AbstractSc
     /**
      * @see Object#equals(Object)
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public boolean equals( Object o )
     {
         if ( !super.equals( o ) )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
Wed May 19 12:02:19 2010
@@ -1105,6 +1105,7 @@ public class SchemaUtils
     /**
      * NOT FULLY IMPLEMENTED!
      */
+    @SuppressWarnings("PMD.UnusedLocalVariable") // Remove me when the TODO is fixed 
     public static StringBuffer render( DITStructureRule dsr )
     {
         StringBuffer buf = new StringBuffer();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java
Wed May 19 12:02:19 2010
@@ -20,15 +20,12 @@
 package org.apache.directory.shared.ldap.schema.comparators;
 
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-
-import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -41,9 +38,6 @@ import org.slf4j.LoggerFactory;
  */
 public class UniqueMemberComparator extends LdapComparator<String>
 {
-    /** A logger for this class */
-    private static final Logger LOG = LoggerFactory.getLogger( UniqueMemberComparator.class
);
-
     /** The serialVersionUID */
     private static final long serialVersionUID = 1L;
 

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=946140&r1=946139&r2=946140&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
Wed May 19 12:02:19 2010
@@ -35,8 +35,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.util.StringTools;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -47,9 +45,6 @@ import org.slf4j.LoggerFactory;
  */
 public abstract class AbstractSchemaLoader implements SchemaLoader
 {
-    /** static class logger */
-    private static final Logger LOG = LoggerFactory.getLogger( AbstractSchemaLoader.class
);
-
     protected SchemaLoaderListener listener;
 
     /** 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java
Wed May 19 12:02:19 2010
@@ -50,9 +50,6 @@ public class DefaultAttributeTypeRegistr
     /** static class logger */
     private static final Logger LOG = LoggerFactory.getLogger( DefaultAttributeTypeRegistry.class
);
 
-    /** Speedup for DEBUG mode */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** cached Oid/normalizer mapping */
     private transient Map<String, OidNormalizer> oidNormalizerMap;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java
Wed May 19 12:02:19 2010
@@ -33,8 +33,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
 import org.apache.directory.shared.ldap.schema.SchemaObjectType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 
 /**
@@ -46,12 +44,6 @@ import org.slf4j.LoggerFactory;
 public class DefaultObjectClassRegistry extends DefaultSchemaObjectRegistry<ObjectClass>

     implements ObjectClassRegistry
 {
-    /** static class logger */
-    private static final Logger LOG = LoggerFactory.getLogger( DefaultObjectClassRegistry.class
);
-
-    /** Speedup for DEBUG mode */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
     /** maps OIDs to a Set of descendants for that OID */
     private Map<String,Set<ObjectClass>> oidToDescendants;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java?rev=946140&r1=946139&r2=946140&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
Wed May 19 12:02:19 2010
@@ -134,6 +134,7 @@ public class Registries implements Schem
     protected Map<SchemaObjectWrapper, Set<SchemaObjectWrapper>> using;
 
     /** A reference on the schema Manager */
+    @SuppressWarnings("PMD.UnusedPrivateField") // False positive 
     private SchemaManager schemaManager;
 
 
@@ -2601,8 +2602,6 @@ public class Registries implements Schem
                 }
                 catch ( LdapException ne )
                 {
-                    int i = 0;
-                    i++;
                     // Nothing to do
                 }
             }



Mime
View raw message