You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/01/06 03:13:34 UTC
svn commit: r896304 - in /directory:
apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/
apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/
apache...
Author: elecharny
Date: Wed Jan 6 02:13:33 2010
New Revision: 896304
URL: http://svn.apache.org/viewvc?rev=896304&view=rev
Log:
Many fixes :
o potential NPE
o unused imports removal
o useless @SuppressWarnings removal
o unused variable removal
Modified:
directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractChangeOperationContext.java
directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java
directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
directory/apacheds/branches/apacheds-schema/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java
directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java
directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java
directory/shared/branches/shared-schema/ldap-client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributeWrapper.java
directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributesWrapper.java
directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterCloneTest.java
directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java
directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractChangeOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractChangeOperationContext.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractChangeOperationContext.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AbstractChangeOperationContext.java Wed Jan 6 02:13:33 2010
@@ -21,8 +21,8 @@
import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.changelog.LogChange;
import org.apache.directory.server.core.changelog.ChangeLogEvent;
+import org.apache.directory.server.core.changelog.LogChange;
import org.apache.directory.shared.ldap.name.LdapDN;
@@ -81,6 +81,6 @@
*/
public boolean isLogChange()
{
- return logChange != logChange.FALSE;
+ return logChange != LogChange.FALSE;
}
}
Modified: directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java Wed Jan 6 02:13:33 2010
@@ -650,7 +650,7 @@
List<String> names = mr.getNames();
- if ( ( names != null ) || ( names.size() > 0 ) )
+ if ( ( names != null ) && ( names.size() > 0 ) )
{
for ( String name : names )
{
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java Wed Jan 6 02:13:33 2010
@@ -19,6 +19,15 @@
*/
package org.apache.directory.server.core.configuration;
+import java.beans.PropertyEditor;
+import java.beans.PropertyEditorSupport;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.StringReader;
+
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -28,14 +37,6 @@
import org.apache.directory.shared.ldap.util.AttributeUtils;
import org.apache.directory.shared.ldap.util.StringTools;
-import javax.naming.NamingException;
-import javax.naming.directory.Attributes;
-import java.beans.PropertyEditor;
-import java.beans.PropertyEditorSupport;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.StringReader;
-
/**
* A JavaBeans {@link PropertyEditor} that can convert {@link Attributes} to
@@ -68,7 +69,6 @@
/**
* Returns LDIF string of {@link Attributes} object.
*/
- @SuppressWarnings("deprecation")
public String getAsText()
{
Attributes attrs = (Attributes) getValue();
Modified: directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java Wed Jan 6 02:13:33 2010
@@ -20,18 +20,16 @@
package org.apache.directory.server.core.subtree;
+import java.util.Iterator;
+
+import javax.naming.NamingException;
+
import org.apache.directory.server.core.entry.ServerAttribute;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
-import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
import org.apache.directory.shared.ldap.filter.EqualityNode;
import org.apache.directory.shared.ldap.filter.SimpleNode;
import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
-import org.apache.directory.shared.ldap.util.StringTools;
-
-import javax.naming.NamingException;
-import java.util.Iterator;
/**
Modified: directory/apacheds/branches/apacheds-schema/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java (original)
+++ directory/apacheds/branches/apacheds-schema/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java Wed Jan 6 02:13:33 2010
@@ -29,14 +29,8 @@
import org.apache.directory.server.kerberos.shared.KerberosConstants;
import org.apache.directory.server.kerberos.shared.KerberosUtils;
import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
-import org.apache.directory.server.kerberos.shared.messages.value.AuthorizationData;
import org.apache.directory.server.kerberos.shared.messages.value.EncryptedData;
-import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
-import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses;
-import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
-import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
-import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
Modified: directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientAddRequestTest.java Wed Jan 6 02:13:33 2010
@@ -32,7 +32,6 @@
import org.apache.directory.server.core.CoreSession;
import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.ldap.LdapServer;
import org.apache.directory.shared.ldap.client.api.LdapConnection;
import org.apache.directory.shared.ldap.client.api.exception.LdapException;
import org.apache.directory.shared.ldap.client.api.listeners.AddListener;
Modified: directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-tools/src/main/java/org/apache/directory/server/tools/IndexCommand.java Wed Jan 6 02:13:33 2010
@@ -62,7 +62,6 @@
}
- @SuppressWarnings("unchecked")
private SchemaManager loadSchemaManager() throws Exception
{
// --------------------------------------------------------------------
@@ -89,7 +88,7 @@
for ( int ii = 0; ii < partitions.length; ii++ )
{
- File partitionDirectory = partitionDirectory = new File( getInstanceLayout().getPartitionsDir(), partitions[ii] );
+ File partitionDirectory = new File( getInstanceLayout().getPartitionsDir(), partitions[ii] );
File indexDir = null;
if( indexDirPath != null )
Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java Wed Jan 6 02:13:33 2010
@@ -135,7 +135,6 @@
}
- @SuppressWarnings("unchecked")
public void before( IndexEntry<V, ServerEntry> element ) throws Exception
{
checkNotClosed( "before()" );
@@ -180,7 +179,6 @@
}
- @SuppressWarnings("unchecked")
public void afterValue( Long id, V value ) throws Exception
{
checkNotClosed( "afterValue()" );
@@ -217,7 +215,6 @@
}
- @SuppressWarnings("unchecked")
public void after( IndexEntry<V, ServerEntry> element ) throws Exception
{
checkNotClosed( "after()" );
@@ -337,7 +334,6 @@
}
- @SuppressWarnings("unchecked")
public boolean next() throws Exception
{
checkNotClosed( "next()" );
Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java Wed Jan 6 02:13:33 2010
@@ -199,7 +199,6 @@
}
- @SuppressWarnings( { "UnusedDeclaration" } )
private boolean evaluateWithIndex( ServerEntry entry ) throws Exception
{
throw new UnsupportedOperationException( "This is too inefficient without getId() on ServerEntry" );
Modified: directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java Wed Jan 6 02:13:33 2010
@@ -162,7 +162,6 @@
@Test
- @SuppressWarnings( "unchecked" )
public void testOrCursorUsingCursorBuilder() throws Exception
{
String filter = "(|(cn=J*)(sn=W*))";
Modified: directory/shared/branches/shared-schema/ldap-client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap-client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap-client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java (original)
+++ directory/shared/branches/shared-schema/ldap-client-api/src/main/java/org/apache/directory/shared/ldap/client/api/LdapConnection.java Wed Jan 6 02:13:33 2010
@@ -79,7 +79,6 @@
import org.apache.directory.shared.ldap.client.api.messages.SearchResultDone;
import org.apache.directory.shared.ldap.client.api.messages.SearchResultEntry;
import org.apache.directory.shared.ldap.client.api.messages.SearchResultReference;
-import org.apache.directory.shared.ldap.client.api.messages.future.BindFuture;
import org.apache.directory.shared.ldap.client.api.messages.future.ResponseFuture;
import org.apache.directory.shared.ldap.client.api.protocol.LdapProtocolCodecFactory;
import org.apache.directory.shared.ldap.codec.ControlCodec;
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/controls/replication/syncStateValue/SyncStateValueControlGrammar.java Wed Jan 6 02:13:33 2010
@@ -29,12 +29,9 @@
import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
import org.apache.directory.shared.asn1.ber.tlv.Value;
import org.apache.directory.shared.asn1.codec.DecoderException;
-import org.apache.directory.shared.asn1.util.BooleanDecoder;
-import org.apache.directory.shared.asn1.util.BooleanDecoderException;
import org.apache.directory.shared.asn1.util.IntegerDecoder;
import org.apache.directory.shared.asn1.util.IntegerDecoderException;
import org.apache.directory.shared.ldap.message.control.replication.SyncStateTypeEnum;
-import org.apache.directory.shared.ldap.message.control.replication.SynchronizationModeEnum;
import org.apache.directory.shared.ldap.util.StringTools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java Wed Jan 6 02:13:33 2010
@@ -36,10 +36,8 @@
import org.apache.directory.shared.ldap.entry.Modification;
import org.apache.directory.shared.ldap.entry.ModificationOperation;
import org.apache.directory.shared.ldap.entry.client.ClientModification;
-import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.util.StringTools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java Wed Jan 6 02:13:33 2010
@@ -36,7 +36,6 @@
import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
import org.apache.directory.shared.ldap.name.LdapDN;
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AbstractExprNode.java Wed Jan 6 02:13:33 2010
@@ -26,7 +26,6 @@
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
-import org.apache.directory.shared.ldap.util.StringTools;
/**
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ExtensibleNode.java Wed Jan 6 02:13:33 2010
@@ -20,12 +20,7 @@
package org.apache.directory.shared.ldap.filter;
-import java.util.Arrays;
-
import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
-import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
-import org.apache.directory.shared.ldap.util.StringTools;
/**
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java Wed Jan 6 02:13:33 2010
@@ -22,8 +22,6 @@
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
-import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
/**
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SubstringNode.java Wed Jan 6 02:13:33 2010
@@ -26,7 +26,6 @@
import javax.naming.NamingException;
-import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
import org.apache.directory.shared.ldap.schema.Normalizer;
import org.apache.directory.shared.ldap.util.StringTools;
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifEntry.java Wed Jan 6 02:13:33 2010
@@ -45,7 +45,6 @@
import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
import org.apache.directory.shared.ldap.name.LdapDN;
import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.util.DNUtils;
import org.apache.directory.shared.ldap.util.StringTools;
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/name/Rdn.java Wed Jan 6 02:13:33 2010
@@ -149,8 +149,6 @@
*
* Note : there is no Generic available classes in commons-collection...
*/
- @SuppressWarnings(
- { "unchecked" })
private MultiMap atavTypes = new MultiValueMap();
/**
@@ -297,8 +295,6 @@
* @param rdn
* The non-null Rdn to be copied.
*/
- @SuppressWarnings(
- { "unchecked" })
public Rdn( Rdn rdn )
{
nbAtavs = rdn.getNbAtavs();
@@ -425,8 +421,6 @@
// WARNING : The protection level is left unspecified intentionally.
// We need this method to be visible from the DnParser class, but not
// from outside this package.
- @SuppressWarnings(
- { "unchecked" })
/* Unspecified protection */void addAttributeTypeAndValue( String upType, String type, Value<?> upValue,
Value<?> value ) throws InvalidNameException
{
@@ -480,8 +474,6 @@
// WARNING : The protection level is left unspecified intentionnaly.
// We need this method to be visible from the DnParser class, but not
// from outside this package.
- @SuppressWarnings(
- { "unchecked" })
/* Unspecified protection */void addAttributeTypeAndValue( AVA value )
{
String normalizedType = value.getNormType();
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributeWrapper.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributeWrapper.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributeWrapper.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributeWrapper.java Wed Jan 6 02:13:33 2010
@@ -19,10 +19,10 @@
package org.apache.directory.shared.ldap.util;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.DirContext;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.DirContext;
/**
@@ -102,7 +102,6 @@
}
- @SuppressWarnings ( { "CloneDoesntCallSuperClone" } )
public Object clone()
{
throw new IllegalStateException( "Now why would you ever want to clone an immutable object?" );
Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributesWrapper.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributesWrapper.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributesWrapper.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/util/ImmutableAttributesWrapper.java Wed Jan 6 02:13:33 2010
@@ -90,7 +90,6 @@
}
- @SuppressWarnings ( { "CloneDoesntCallSuperClone" } )
public Object clone()
{
throw new IllegalStateException( "Now why would you want to clone() an immutable object in the first place." );
Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterCloneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterCloneTest.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterCloneTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterCloneTest.java Wed Jan 6 02:13:33 2010
@@ -27,8 +27,6 @@
import java.text.ParseException;
-import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
-import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java Wed Jan 6 02:13:33 2010
@@ -20,23 +20,17 @@
package org.apache.directory.shared.ldap.filter;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
-import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
-import org.apache.directory.shared.ldap.filter.BranchNode;
-import org.apache.directory.shared.ldap.filter.ExtensibleNode;
-import org.apache.directory.shared.ldap.filter.PresenceNode;
-import org.apache.directory.shared.ldap.filter.SimpleNode;
-import org.apache.directory.shared.ldap.filter.SubstringNode;
-import org.apache.directory.shared.ldap.util.StringTools;
import org.junit.Test;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNull;
/**
@@ -723,7 +717,6 @@
}
- @SuppressWarnings("unchecked")
@Test
public void testTwoByteUTF8Raw() throws ParseException
{
@@ -732,7 +725,7 @@
try
{
- String s = new String( bytes, "UTF-8" );
+ new String( bytes, "UTF-8" );
String str = "(cn=\\C2\\A2)";
SimpleNode<?> node = ( SimpleNode<?> ) FilterParser.parse( str );
@@ -749,7 +742,6 @@
}
- @SuppressWarnings("unchecked")
@Test
public void testTwoByteUTF8Escaped() throws ParseException
{
@@ -759,7 +751,7 @@
try
{
String str = "(cn=\\C2\\A2)";
- String s = new String( bytes, "UTF-8" );
+ new String( bytes, "UTF-8" );
SimpleNode<?> node = ( SimpleNode<?> ) FilterParser.parse( str );
@@ -776,7 +768,6 @@
}
- @SuppressWarnings("unchecked")
@Test
public void testThreeByteUTF8Raw() throws ParseException
{
@@ -785,7 +776,7 @@
try
{
- String s = new String( bytes, "UTF-8" );
+ new String( bytes, "UTF-8" );
String str = "(cn=\\E2\\89\\A0)";
SimpleNode<?> node = ( SimpleNode<?> ) FilterParser.parse( str );
@@ -802,7 +793,6 @@
}
- @SuppressWarnings("unchecked")
@Test
public void testThreeByteUTF8Escaped() throws ParseException
{
@@ -812,7 +802,7 @@
try
{
String str = "(cn=\\E2\\89\\A0aa)";
- String s = new String( bytes, "UTF-8" );
+ new String( bytes, "UTF-8" );
SimpleNode<?> node = ( SimpleNode<?> ) FilterParser.parse( str );
@@ -829,7 +819,6 @@
}
- @SuppressWarnings("unchecked")
@Test
public void testThreeByteJapaneseUTF8Raw() throws ParseException
{
@@ -838,7 +827,7 @@
try
{
- String s = new String( bytes, "UTF-8" );
+ new String( bytes, "UTF-8" );
String str = "(cn=\\E3\\81\\99)";
SimpleNode<?> node = ( SimpleNode<?> ) FilterParser.parse( str );
@@ -855,7 +844,6 @@
}
- @SuppressWarnings("unchecked")
@Test
public void testThreeByteJapaneseUTF8Escaped() throws ParseException
{
@@ -865,7 +853,7 @@
try
{
String str = "(cn=\\E3\\81\\99)";
- String s = new String( bytes, "UTF-8" );
+ new String( bytes, "UTF-8" );
SimpleNode<?> node = ( SimpleNode<?> ) FilterParser.parse( str );
assertEquals( "cn", node.getAttribute() );
@@ -1055,19 +1043,10 @@
*/
-
-
- @SuppressWarnings("unchecked")
@Test
public void testBinaryValueEscaped() throws ParseException
{
- byte[] bytes =
- { 0x29, 0x4C, 0x04, (byte)0xB5,
- (byte)0xD4, (byte)0xED, 0x38, 0x46,
- (byte)0x87, (byte)0xEE, 0x77, 0x58,
- 0x5C, 0x32, (byte)0xAD, (byte)0x91 };
-
String str = "(objectguid=\\29\\4C\\04\\B5\\D4\\ED\\38\\46\\87\\EE\\77\\58\\5C\\32\\AD\\91)";
- SimpleNode<String> node = ( SimpleNode<String> ) FilterParser.parse( str );
+ FilterParser.parse( str );
}
}
Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/ldif/LdifUtilsTest.java Wed Jan 6 02:13:33 2010
@@ -19,21 +19,14 @@
*/
package org.apache.directory.shared.ldap.ldif;
-import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
-import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
-import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.util.StringTools;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import org.junit.Test;
+import java.util.List;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
@@ -41,7 +34,14 @@
import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
-import java.util.List;
+import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
+import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
/**
@@ -336,18 +336,6 @@
@Test
public void testConvertToLdif() throws NamingException
{
- String expected =
- "dn:: Y249U2Fhcm\n" +
- " Jyw7xja2VuLCBk\n" +
- " Yz1leGFtcGxlLC\n" +
- " BkYz1jb20=\n" +
- "changeType: Add\n" +
- "sn: test\n" +
- "cn:: U2FhcmJyw7\n xja2Vu\n" +
- "objectClass: to\n p\n" +
- "objectClass: pe\n rson\n" +
- "objectClass: in\n etorgPerson\n\n";
-
LdifEntry entry = new LdifEntry();
entry.setDn( "cn=Saarbr\u00FCcken, dc=example, dc=com" );
entry.setChangeType( ChangeType.Add );
@@ -360,7 +348,7 @@
entry.addAttribute( "cn", "Saarbr\u00FCcken" );
entry.addAttribute( "sn", "test" );
- String ldif = LdifUtils.convertToLdif( entry, 15 );
+ LdifUtils.convertToLdif( entry, 15 );
//Attributes result = LdifUtils.convertFromLdif( ldif );
//assertEquals( entry, result );
}
Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?rev=896304&r1=896303&r2=896304&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java (original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java Wed Jan 6 02:13:33 2010
@@ -3574,19 +3574,19 @@
// The second ATAV
for ( AVA ava : rdn )
{
- if ( "example".equals( atav.getNormValue().get() ) )
+ if ( "example".equals( ava.getNormValue().get() ) )
{
// Skip the first one
continue;
}
- assertEquals( "2.5.4.11=test", atav.getNormName() );
- assertEquals( "2.5.4.11", atav.getNormType() );
- assertEquals( "test", atav.getNormValue().get() );
-
- assertEquals( "ou", atav.getUpType() );
- assertEquals( "TEST", atav.getUpValue().get() );
- assertEquals( " ou = TEST ", atav.getUpName() );
+ assertEquals( "2.5.4.11=test", ava.getNormName() );
+ assertEquals( "2.5.4.11", ava.getNormType() );
+ assertEquals( "test", ava.getNormValue().get() );
+
+ assertEquals( "ou", ava.getUpType() );
+ assertEquals( "TEST", ava.getUpValue().get() );
+ assertEquals( " ou = TEST ", ava.getUpName() );
}
}