You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by fe...@apache.org on 2010/05/19 14:36:36 UTC
svn commit: r946153 - 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...
Author: felixk
Date: Wed May 19 12:36:35 2010
New Revision: 946153
URL: http://svn.apache.org/viewvc?rev=946153&view=rev
Log:
remove unused parameters in private methods
Modified:
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/LdapTransformer.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/schema/AttributeType.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/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=946153&r1=946152&r2=946153&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:36:35 2010
@@ -250,8 +250,8 @@ public class SchemaEntityFactory impleme
/**
* Class load a syntaxChecker instance
*/
- private SyntaxChecker classLoadSyntaxChecker( SchemaManager schemaManager, String oid, String className,
- EntryAttribute byteCode, Registries targetRegistries ) throws Exception
+ private SyntaxChecker classLoadSyntaxChecker( String oid, String className, EntryAttribute byteCode )
+ throws Exception
{
// Try to class load the syntaxChecker
Class<?> clazz = null;
@@ -320,7 +320,7 @@ public class SchemaEntityFactory impleme
EntryAttribute byteCode = entry.get( MetaSchemaConstants.M_BYTECODE_AT );
// Class load the syntaxChecker
- SyntaxChecker syntaxChecker = classLoadSyntaxChecker( schemaManager, oid, className, byteCode, targetRegistries );
+ SyntaxChecker syntaxChecker = classLoadSyntaxChecker( oid, className, byteCode );
// Update the common fields
setSchemaObjectProperties( syntaxChecker, entry, schema );
@@ -360,7 +360,7 @@ public class SchemaEntityFactory impleme
EntryAttribute byteCode = getByteCode( syntaxCheckerDescription, SchemaConstants.SYNTAX_CHECKER );
// Class load the SyntaxChecker
- SyntaxChecker syntaxChecker = classLoadSyntaxChecker( schemaManager, oid, fqcn, byteCode, targetRegistries );
+ SyntaxChecker syntaxChecker = classLoadSyntaxChecker( oid, fqcn, byteCode );
// Update the common fields
setSchemaObjectProperties( syntaxChecker, syntaxCheckerDescription, schema );
@@ -373,7 +373,7 @@ public class SchemaEntityFactory impleme
* Class load a comparator instances
*/
private LdapComparator<?> classLoadComparator( SchemaManager schemaManager, String oid, String className,
- EntryAttribute byteCode, Registries targetRegistries ) throws Exception
+ EntryAttribute byteCode ) throws Exception
{
// Try to class load the comparator
LdapComparator<?> comparator = null;
@@ -456,7 +456,7 @@ public class SchemaEntityFactory impleme
EntryAttribute byteCode = getByteCode( comparatorDescription, SchemaConstants.COMPARATOR );
// Class load the comparator
- LdapComparator<?> comparator = classLoadComparator( schemaManager, oid, fqcn, byteCode, targetRegistries );
+ LdapComparator<?> comparator = classLoadComparator( schemaManager, oid, fqcn, byteCode );
// Update the common fields
setSchemaObjectProperties( comparator, comparatorDescription, schema );
@@ -502,7 +502,7 @@ public class SchemaEntityFactory impleme
EntryAttribute byteCode = entry.get( MetaSchemaConstants.M_BYTECODE_AT );
// Class load the comparator
- LdapComparator<?> comparator = classLoadComparator( schemaManager, oid, fqcn, byteCode, targetRegistries );
+ LdapComparator<?> comparator = classLoadComparator( schemaManager, oid, fqcn, byteCode );
// Update the common fields
setSchemaObjectProperties( comparator, entry, schema );
@@ -516,7 +516,7 @@ public class SchemaEntityFactory impleme
* Class load a normalizer instances
*/
private Normalizer classLoadNormalizer( SchemaManager schemaManager, String oid, String className,
- EntryAttribute byteCode, Registries targetRegistries ) throws Exception
+ EntryAttribute byteCode ) throws Exception
{
// Try to class load the normalizer
Class<?> clazz = null;
@@ -580,7 +580,7 @@ public class SchemaEntityFactory impleme
EntryAttribute byteCode = getByteCode( normalizerDescription, SchemaConstants.NORMALIZER );
// Class load the normalizer
- Normalizer normalizer = classLoadNormalizer( schemaManager, oid, fqcn, byteCode, targetRegistries );
+ Normalizer normalizer = classLoadNormalizer( schemaManager, oid, fqcn, byteCode );
// Update the common fields
setSchemaObjectProperties( normalizer, normalizerDescription, schema );
@@ -626,7 +626,7 @@ public class SchemaEntityFactory impleme
EntryAttribute byteCode = entry.get( MetaSchemaConstants.M_BYTECODE_AT );
// Class load the Normalizer
- Normalizer normalizer = classLoadNormalizer( schemaManager, oid, className, byteCode, targetRegistries );
+ Normalizer normalizer = classLoadNormalizer( schemaManager, oid, className, byteCode );
// Update the common fields
setSchemaObjectProperties( normalizer, entry, schema );
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=946153&r1=946152&r2=946153&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:36:35 2010
@@ -673,8 +673,8 @@ public class DefaultSchemaManager implem
* - isRelaxed
* - disabledAccepted
*/
- @SuppressWarnings("PMD.UnusedPrivateMethod")
// False positive
+ @SuppressWarnings("PMD.UnusedPrivateMethod")
private boolean unload( Registries registries, Schema schema ) throws Exception
{
if ( schema == null )
@@ -732,6 +732,8 @@ public class DefaultSchemaManager implem
/**
* Add all the Schema's DitContentRules
*/
+ // Not yet implemented, but may be used
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private void addDitContentRules( Schema schema, Registries registries ) throws Exception
{
if ( !schemaLoader.loadDitContentRules( schema ).isEmpty() )
@@ -748,6 +750,8 @@ public class DefaultSchemaManager implem
/**
* Add all the Schema's DitStructureRules
*/
+ // Not yet implemented, but may be used
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private void addDitStructureRules( Schema schema, Registries registries ) throws Exception
{
if ( !schemaLoader.loadDitStructureRules( schema ).isEmpty() )
@@ -778,6 +782,8 @@ public class DefaultSchemaManager implem
/**
* Add all the Schema's MatchingRuleUses
*/
+ // Not yet implemented, but may be used
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private void addMatchingRuleUses( Schema schema, Registries registries ) throws Exception
{
if ( !schemaLoader.loadMatchingRuleUses( schema ).isEmpty() )
@@ -794,6 +800,8 @@ public class DefaultSchemaManager implem
/**
* Add all the Schema's NameForms
*/
+ // Not yet implemented, but may be used
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private void addNameForms( Schema schema, Registries registries ) throws Exception
{
if ( !schemaLoader.loadNameForms( schema ).isEmpty() )
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java?rev=946153&r1=946152&r2=946153&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java Wed May 19 12:36:35 2010
@@ -59,7 +59,6 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
-import org.apache.directory.shared.ldap.codec.unbind.UnBindRequestCodec;
import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Modification;
@@ -783,11 +782,10 @@ public class LdapTransformer
* Transform an UnBindRequest message from a CodecMessage to a
* InternalMessage
*
- * @param codecMessage The message to transform
* @param messageId The message Id
* @return A Internal UnBindRequestImpl
*/
- private static InternalMessage transformUnBindRequest( LdapMessageCodec codecMessage, int messageId )
+ private static InternalMessage transformUnBindRequest( int messageId )
{
return new UnbindRequestImpl( messageId );
}
@@ -821,7 +819,7 @@ public class LdapTransformer
break;
case UNBIND_REQUEST :
- internalMessage = transformUnBindRequest( (UnBindRequestCodec)codecMessage, messageId );
+ internalMessage = transformUnBindRequest( messageId );
break;
case SEARCH_REQUEST :
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=946153&r1=946152&r2=946153&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:36:35 2010
@@ -83,7 +83,7 @@ public class FilterParser
pos.start++;
// Get the assertionValue
- node.setValue( parseAssertionValue( filter, pos, true ) );
+ node.setValue( parseAssertionValue( filter, pos ) );
return node;
}
@@ -98,7 +98,7 @@ public class FilterParser
pos.start += 2;
// Get the assertionValue
- node.setValue( parseAssertionValue( filter, pos, true ) );
+ node.setValue( parseAssertionValue( filter, pos ) );
return node;
}
@@ -145,7 +145,7 @@ public class FilterParser
pos.start++;
// Get the assertionValue
- node.setValue( parseAssertionValue( filter, pos, true ) );
+ node.setValue( parseAssertionValue( filter, pos ) );
return node;
}
@@ -160,7 +160,7 @@ public class FilterParser
pos.start += 2;
// Get the assertionValue
- node.setValue( parseAssertionValue( filter, pos, true ) );
+ node.setValue( parseAssertionValue( filter, pos ) );
return node;
}
@@ -211,7 +211,7 @@ public class FilterParser
* HEX = '0'-'9' / 'A'-'F' / 'a'-'f'
* unicodeSubset = %x01-27 / %x2B-5B / %x5D-FFFF
*/
- private static Value<?> parseAssertionValue( String filter, Position pos, boolean preserveEscapedChars ) throws ParseException
+ private static Value<?> parseAssertionValue( String filter, Position pos ) throws ParseException
{
char c = StringTools.charAt( filter, pos.start );
@@ -274,12 +274,6 @@ public class FilterParser
}
- private static Value<?> parseAssertionValue( String filter, Position pos ) throws ParseException
- {
- return parseAssertionValue( filter, pos, false );
- }
-
-
/**
* Parse a substring
*/
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=946153&r1=946152&r2=946153&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 Wed May 19 12:36:35 2010
@@ -529,7 +529,7 @@ public class AttributeType extends Abstr
/**
* Check the constraints for the Usage field.
*/
- private void checkUsage( List<Throwable> errors, Registries registries )
+ private void checkUsage( List<Throwable> errors )
{
// Check that the AT usage is the same that its superior
if ( ( superior != null ) && ( usage != superior.getUsage() ) )
@@ -559,7 +559,7 @@ public class AttributeType extends Abstr
/**
* Check the constraints for the Collective field.
*/
- private void checkCollective( List<Throwable> errors, Registries registries )
+ private void checkCollective( List<Throwable> errors )
{
if ( superior != null && superior.isCollective() )
{
@@ -615,10 +615,10 @@ public class AttributeType extends Abstr
buildSubstring( errors, registries );
// Check the USAGE
- checkUsage( errors, registries );
+ checkUsage( errors );
// Check the COLLECTIVE element
- checkCollective( errors, registries );
+ checkCollective( errors );
// Inject the attributeType into the oid/normalizer map
attributeTypeRegistry.addMappingFor( this );
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=946153&r1=946152&r2=946153&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:36:35 2010
@@ -667,6 +667,8 @@ public class Registries implements Schem
/**
* Build the DitContentRule references
*/
+ // Remove me when TODO is implemented
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private void buildDitContentRuleReferences( List<Throwable> errors )
{
for ( DITContentRule ditContentRule : ditContentRuleRegistry )
@@ -679,6 +681,8 @@ public class Registries implements Schem
/**
* Build the DitStructureRule references
*/
+ // Remove me when TODO is implemented
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private void buildDitStructureRuleReferences( List<Throwable> errors )
{
for ( DITStructureRule ditStructureRule : ditStructureRuleRegistry )
@@ -782,6 +786,8 @@ public class Registries implements Schem
/**
* Build the NameForm references
*/
+ // Remove me when TODO is implemented
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private void buildNameFormReferences( List<Throwable> errors )
{
for ( NameForm nameFormRule : nameFormRegistry )
@@ -1731,6 +1737,8 @@ public class Registries implements Schem
* @param schemaObject The SchemaObject we want to deregister
* @throws LdapException If the removal failed
*/
+ // Remove me when TODO is implemented
+ @SuppressWarnings("PMD.UnusedFormalParameter")
private SchemaObject unregister( List<Throwable> errors, SchemaObject schemaObject ) throws LdapException
{
LOG.debug( "Unregistering {}:{}", schemaObject.getObjectType(), schemaObject.getOid() );