Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed useless imports

git-svn-id: https://svn.apache.org/repos/asf/directory/shared/trunk@1459833 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 3fbd600a5edcc68a1b64c32b0581630561bfb27e 1 parent 079058a
Emmanuel Lecharny authored
View
3  ldap/model/src/main/java/org/apache/directory/api/ldap/model/csn/Csn.java
@@ -27,7 +27,6 @@
import org.apache.directory.api.i18n.I18n;
import org.apache.directory.api.util.Chars;
-import org.apache.directory.api.util.DateUtils;
import org.apache.directory.api.util.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -83,7 +82,7 @@
private static final SimpleDateFormat SDF = new SimpleDateFormat( "yyyyMMddHHmmss" );
private static final TimeZone UTC_TIME_ZONE = TimeZone.getTimeZone( "UTC" );
-
+
// Initialize the dateFormat with the UTC TZ
static
{
View
2  ldap/model/src/main/java/org/apache/directory/api/ldap/model/cursor/DefaultClosureMonitor.java
@@ -19,8 +19,6 @@
*/
package org.apache.directory.api.ldap.model.cursor;
-import java.nio.channels.ClosedChannelException;
-
/**
* A basic ClosureMonitor that simply uses a boolean for state and a cause
View
5 ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/Entry.java
@@ -23,7 +23,6 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-import java.util.Set;
import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
@@ -832,8 +831,8 @@
* @return true if the Entry is schema aware
*/
boolean isSchemaAware();
-
-
+
+
/**
* A pretty-pinter for Entries
*
View
1  ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/ImmutableEntry.java
@@ -25,7 +25,6 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-import java.util.Set;
import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
View
42 ldap/model/src/main/java/org/apache/directory/api/ldap/model/entry/StringValue.java
@@ -22,14 +22,12 @@
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
-import java.util.Arrays;
import java.util.Comparator;
import org.apache.directory.api.i18n.I18n;
import org.apache.directory.api.ldap.model.exception.LdapException;
import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
import org.apache.directory.api.ldap.model.schema.AttributeType;
-import org.apache.directory.api.ldap.model.schema.LdapComparator;
import org.apache.directory.api.ldap.model.schema.MatchingRule;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.util.Strings;
@@ -48,7 +46,7 @@
{
/** Used for serialization */
private static final long serialVersionUID = 2L;
-
+
/** The UTF-8 bytes for this value */
private byte[] bytes;
@@ -122,8 +120,8 @@ public String getValue()
// object without copying it.
return wrappedValue;
}
-
-
+
+
/**
* {@inheritDoc}
*/
@@ -270,7 +268,7 @@ public boolean equals( Object obj )
}
StringValue other = ( StringValue ) obj;
-
+
// First check if we have an attrbuteType.
if ( attributeType != null )
{
@@ -294,11 +292,11 @@ public boolean equals( Object obj )
{
return true;
}
-
+
// We have an AttributeType, we use the associated comparator
try
{
- Comparator<String> comparator = ( Comparator<String> ) getLdapComparator();
+ Comparator<String> comparator = getLdapComparator();
// Compare normalized values
if ( comparator == null )
@@ -334,22 +332,22 @@ public boolean equals( Object obj )
// We have an AttributeType on the base value, we need to use its comparator
try
{
- Comparator<String> comparator = ( Comparator<String> ) getLdapComparator();
+ Comparator<String> comparator = getLdapComparator();
// Compare normalized values. We have to normalized the other value,
// as it has no AT
MatchingRule equality = getAttributeType().getEquality();
-
+
if ( equality == null )
{
// No matching rule : compare the raw values
return getNormReference().equals( other.getNormReference() );
}
-
+
Normalizer normalizer = equality.getNormalizer();
-
- StringValue otherValue = (StringValue)normalizer.normalize( other );
-
+
+ StringValue otherValue = ( StringValue ) normalizer.normalize( other );
+
if ( comparator == null )
{
return getNormReference().equals( otherValue.getNormReference() );
@@ -377,25 +375,25 @@ public boolean equals( Object obj )
{
return other.isNull();
}
-
+
try
{
- Comparator<String> comparator = ( Comparator<String> ) other.getLdapComparator();
+ Comparator<String> comparator = other.getLdapComparator();
// Compare normalized values. We have to normalized the other value,
// as it has no AT
MatchingRule equality = other.getAttributeType().getEquality();
-
+
if ( equality == null )
{
// No matching rule : compare the raw values
return getNormReference().equals( other.getNormReference() );
}
-
+
Normalizer normalizer = equality.getNormalizer();
-
- StringValue thisValue = (StringValue)normalizer.normalize( this );
-
+
+ StringValue thisValue = ( StringValue ) normalizer.normalize( this );
+
if ( comparator == null )
{
return thisValue.getNormReference().equals( other.getNormReference() );
@@ -417,7 +415,7 @@ public boolean equals( Object obj )
{
return other.isNull();
}
-
+
// Now check the normalized values
return getNormReference().equals( other.getNormReference() );
}
View
4 ldap/model/src/main/java/org/apache/directory/api/ldap/model/password/PasswordUtil.java
@@ -25,14 +25,10 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
-import java.util.Iterator;
import org.apache.directory.api.ldap.model.constants.LdapSecurityConstants;
-import org.apache.directory.api.ldap.model.entry.Attribute;
-import org.apache.directory.api.ldap.model.entry.Value;
import org.apache.directory.api.util.Base64;
import org.apache.directory.api.util.DateUtils;
import org.apache.directory.api.util.Strings;
View
87 ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/registries/Registries.java
@@ -50,7 +50,6 @@
import org.apache.directory.api.ldap.model.schema.NameForm;
import org.apache.directory.api.ldap.model.schema.Normalizer;
import org.apache.directory.api.ldap.model.schema.ObjectClass;
-import org.apache.directory.api.ldap.model.schema.SchemaManager;
import org.apache.directory.api.ldap.model.schema.SchemaObject;
import org.apache.directory.api.ldap.model.schema.SchemaObjectWrapper;
import org.apache.directory.api.ldap.model.schema.SyntaxChecker;
@@ -562,8 +561,8 @@ public void delCrossReferences( AttributeType attributeType )
delReference( attributeType, attributeType.getSuperior() );
}
}
-
-
+
+
/**
* Build the AttributeType references. This has to be done recursively, as
* an AttributeType may inherit its parent's MatchingRules. The references
@@ -662,32 +661,32 @@ public void buildReference( List<Throwable> errors, SchemaObject schemaObject )
{
switch ( schemaObject.getObjectType() )
{
- case ATTRIBUTE_TYPE :
- AttributeTypeHelper.addToRegistries( (MutableAttributeType)schemaObject, errors, this );
+ case ATTRIBUTE_TYPE:
+ AttributeTypeHelper.addToRegistries( ( MutableAttributeType ) schemaObject, errors, this );
break;
-
- case DIT_CONTENT_RULE :
- DitContentRuleHelper.addToRegistries( (DitContentRule)schemaObject, errors, this );
+
+ case DIT_CONTENT_RULE:
+ DitContentRuleHelper.addToRegistries( ( DitContentRule ) schemaObject, errors, this );
break;
-
- case LDAP_SYNTAX :
- LdapSyntaxHelper.addToRegistries( (LdapSyntax)schemaObject, errors, this );
+
+ case LDAP_SYNTAX:
+ LdapSyntaxHelper.addToRegistries( ( LdapSyntax ) schemaObject, errors, this );
break;
-
- case MATCHING_RULE :
- MatchingRuleHelper.addToRegistries( (MutableMatchingRule)schemaObject, errors, this );
+
+ case MATCHING_RULE:
+ MatchingRuleHelper.addToRegistries( ( MutableMatchingRule ) schemaObject, errors, this );
break;
-
- case MATCHING_RULE_USE :
- MatchingRuleUseHelper.addToRegistries( (MatchingRuleUse)schemaObject, errors, this );
+
+ case MATCHING_RULE_USE:
+ MatchingRuleUseHelper.addToRegistries( ( MatchingRuleUse ) schemaObject, errors, this );
break;
-
- case NAME_FORM :
- NameFormHelper.addToRegistries( (NameForm)schemaObject, errors, this );
+
+ case NAME_FORM:
+ NameFormHelper.addToRegistries( ( NameForm ) schemaObject, errors, this );
break;
-
- case OBJECT_CLASS :
- ObjectClassHelper.addToRegistries( (ObjectClass)schemaObject, errors, this );
+
+ case OBJECT_CLASS:
+ ObjectClassHelper.addToRegistries( ( ObjectClass ) schemaObject, errors, this );
break;
}
}
@@ -712,20 +711,20 @@ public void removeReference( List<Throwable> errors, SchemaObject schemaObject )
{
switch ( schemaObject.getObjectType() )
{
- case ATTRIBUTE_TYPE :
- AttributeTypeHelper.removeFromRegistries( (AttributeType)schemaObject, errors, this );
+ case ATTRIBUTE_TYPE:
+ AttributeTypeHelper.removeFromRegistries( ( AttributeType ) schemaObject, errors, this );
break;
- case LDAP_SYNTAX :
- LdapSyntaxHelper.removeFromRegistries( (LdapSyntax)schemaObject, errors, this );
+ case LDAP_SYNTAX:
+ LdapSyntaxHelper.removeFromRegistries( ( LdapSyntax ) schemaObject, errors, this );
break;
- case MATCHING_RULE :
- MatchingRuleHelper.removeFromRegistries( (MatchingRule)schemaObject, errors, this );
+ case MATCHING_RULE:
+ MatchingRuleHelper.removeFromRegistries( ( MatchingRule ) schemaObject, errors, this );
break;
- case OBJECT_CLASS :
- ObjectClassHelper.removeFromRegistries( (ObjectClass)schemaObject, errors, this );
+ case OBJECT_CLASS:
+ ObjectClassHelper.removeFromRegistries( ( ObjectClass ) schemaObject, errors, this );
break;
}
}
@@ -930,7 +929,7 @@ private void resolve( LdapComparator<?> comparator, List<Throwable> errors )
{
// This is currently doing nothing.
}
-
+
/**
* Attempts to resolve the SyntaxChecker
@@ -1893,10 +1892,11 @@ public String dumpUsedBy()
{
for ( SchemaObjectWrapper wrapper : usedBy.keySet() )
{
- sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid() ).append( "] : {" );
-
+ sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid() )
+ .append( "] : {" );
+
boolean isFirst = true;
-
+
for ( SchemaObjectWrapper uses : usedBy.get( wrapper ) )
{
if ( isFirst )
@@ -1907,10 +1907,10 @@ public String dumpUsedBy()
{
sb.append( ", " );
}
-
+
sb.append( uses.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid() ).append( "]" );
}
-
+
sb.append( "}\n" );
}
}
@@ -1936,10 +1936,11 @@ public String dumpUsing()
{
for ( SchemaObjectWrapper wrapper : using.keySet() )
{
- sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid() ).append( "] : {" );
-
+ sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid() )
+ .append( "] : {" );
+
boolean isFirst = true;
-
+
for ( SchemaObjectWrapper uses : using.get( wrapper ) )
{
if ( isFirst )
@@ -1950,10 +1951,10 @@ public String dumpUsing()
{
sb.append( ", " );
}
-
+
sb.append( uses.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid() ).append( "]" );
}
-
+
sb.append( "}\n" );
}
}
@@ -2811,8 +2812,6 @@ public void clear() throws LdapException
}
-
-
/**
* @see Object#toString()
*/
Please sign in to comment.
Something went wrong with that request. Please try again.