directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r946342 [1/3] - in /directory/shared/branches/xdbm-refactoring: ./ ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/ ldap-convert/src/main/java/org/apache/directory/shared/converter/schema/ ldap-schema-loader/src/main...
Date Wed, 19 May 2010 19:03:54 GMT
Author: seelmann
Date: Wed May 19 19:03:51 2010
New Revision: 946342

URL: http://svn.apache.org/viewvc?rev=946342&view=rev
Log:
Merged trunk

Added:
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapExceptionUtils.java
      - copied unchanged from r946334, directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapExceptionUtils.java
Removed:
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ArrayUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/BooleanUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ClassUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/EqualsBuilder.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ExceptionUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/KeyValue.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/Nestable.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/NestableDelegate.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/NestableError.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/NestableException.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/NestableRuntimeException.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ObjectUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ParserPipedInputStream.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ReflectionToStringBuilder.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/SpringClassUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/SystemUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ToStringBuilder.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/ToStringStyle.java
Modified:
    directory/shared/branches/xdbm-refactoring/   (props changed)
    directory/shared/branches/xdbm-refactoring/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/MetaSchemaConstants.java   (props changed)
    directory/shared/branches/xdbm-refactoring/ldap-convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java
    directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
    directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
    directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/   (props changed)
    directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/   (props changed)
    directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java   (contents, props changed)
    directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java
    directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java
    directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/ResourceMap.java
    directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.100.ldif
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponseImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponseImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/IntermediateResponseImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ReferralImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImpl.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelResponse.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationResponse.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiRequest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVASerializer.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/AttributeType.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITContentRule.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/DITStructureRule.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/LdapSyntax.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleUse.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/NameForm.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/SchemaUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DeepTrimToLowerCachingNormalizingComparator.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingDeepTrimNormalizer.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingDeepTrimToLowerNormalizer.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/CachingDnNormalizer.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ParserDescriptionUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/AbstractSchemaLoader.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultAttributeTypeRegistry.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultObjectClassRegistry.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/OidRegistry.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/AttributeUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/LdapURL.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/PreferencesDictionary.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/PropertiesUtils.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/SequencedHashMap.java
    directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/ArrayNamingEnumerationTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/ReferralImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java
    directory/shared/branches/xdbm-refactoring/ldap/src/test/java/org/apache/directory/shared/ldap/util/StringToolsTest.java

Propchange: directory/shared/branches/xdbm-refactoring/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 19 19:03:51 2010
@@ -1,2 +1,3 @@
 /directory/shared/branches/shared-replication:749791-764113
 /directory/shared/branches/shared-schema:806622-896441
+/directory/shared/trunk:945830-946334

Propchange: directory/shared/branches/xdbm-refactoring/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/MetaSchemaConstants.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 19 19:03:51 2010
@@ -1 +1,2 @@
 /directory/apacheds/branches/apacheds-replication/core-constants/src/main/java/org/apache/directory/server/constants/MetaSchemaConstants.java:749790-764110
+/directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/MetaSchemaConstants.java:945830-946334

Modified: directory/shared/branches/xdbm-refactoring/ldap-convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-convert/src/main/java/org/apache/directory/shared/converter/schema/SchemaParser.java Wed May 19 19:03:51 2010
@@ -30,30 +30,12 @@ import java.io.Writer;
 import java.text.ParseException;
 import java.util.List;
 
+import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.directory.shared.i18n.I18n;
-import org.apache.directory.shared.ldap.util.ExceptionUtils;
 
 import antlr.RecognitionException;
 import antlr.TokenStreamException;
 
-/*
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PipedInputStream;
-import java.io.PipedOutputStream;
-import java.io.Writer;
-import java.text.ParseException;
-import java.util.List;
-
-import antlr.RecognitionException;
-import antlr.TokenStreamException;
-
-import org.apache.directory.shared.ldap.util.ExceptionUtils;
-*/
-
 
 /**
  * A reusable wrapper for antlr generated schema parsers.

Modified: directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoader.java Wed May 19 19:03:51 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/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaEntityFactory.java Wed May 19 19:03:51 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[]
         {};
@@ -258,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;
@@ -328,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 );
@@ -368,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 );
@@ -381,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;
@@ -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 ) )
@@ -464,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 );
@@ -510,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 );
@@ -524,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;
@@ -588,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 );
@@ -634,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 );
@@ -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 

Propchange: directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 19 19:03:51 2010
@@ -1,3 +1,3 @@
 /directory/shared/branches/shared-replication/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager:749791-764113
 /directory/shared/branches/shared-schema/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager:806622-896441
-/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager:806622-894844*
+/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager:806622-894844*,945830-946334

Propchange: directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 19 19:03:51 2010
@@ -1,3 +1,3 @@
 /directory/shared/branches/shared-replication/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:749791-764113
 /directory/shared/branches/shared-schema/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:806622-896441
-/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:806622-894844*
+/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:806622-894844*,945830-946334

Modified: directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java Wed May 19 19:03:51 2010
@@ -36,7 +36,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.exception.LdapProtocolErrorException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
-//import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -113,7 +112,7 @@ public class DefaultSchemaManager implem
 
     /** the normalized name for the schema modification attributes */
     private DN schemaModificationAttributesDN;
-    
+
     /** A Map containing all the schema being dependent from a schema */
     private Map<String, Set<String>> schemaDependences = new HashMap<String, Set<String>>();
 
@@ -197,14 +196,15 @@ public class DefaultSchemaManager implem
         for ( String schemaName : schemas )
         {
             Schema schema = schemaLoader.getSchema( schemaName );
-            
+
             if ( schema != null )
             {
                 schemaArray[n++] = schema;
             }
             else
             {
-                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_11001, schemaName ) );
+                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err(
+                    I18n.ERR_11001, schemaName ) );
             }
         }
 
@@ -216,7 +216,7 @@ public class DefaultSchemaManager implem
     {
         // Create a content container for this schema
         registries.addSchema( schema.getSchemaName() );
-        
+
         // And inject any existig SchemaObject into the registries 
         addComparators( schema, registries );
         addNormalizers( schema, registries );
@@ -257,25 +257,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
@@ -531,7 +512,7 @@ public class DefaultSchemaManager implem
         {
             return true;
         }
-        
+
         boolean loaded = false;
 
         // Reset the errors if not null
@@ -547,7 +528,7 @@ public class DefaultSchemaManager implem
         // Load the schemas
         for ( Schema schema : schemas )
         {
-            if ( !load( clonedRegistries, schema ) && ( ! errors.isEmpty() ) )
+            if ( !load( clonedRegistries, schema ) && ( !errors.isEmpty() ) )
             {
                 return false;
             }
@@ -570,26 +551,26 @@ public class DefaultSchemaManager implem
                 for ( Schema schema : schemas )
                 {
                     load( registries, schema );
-                    
+
                     // Update the schema dependences if needed
-                    
+
                     if ( schema.getDependencies() != null )
                     {
                         for ( String dep : schema.getDependencies() )
                         {
                             Set<String> deps = schemaDependences.get( dep );
-                            
+
                             if ( deps == null )
                             {
                                 deps = new HashSet<String>();
                                 deps.add( schema.getSchemaName() );
                             }
-                            
+
                             // Replace the dependences
                             schemaDependences.put( dep, deps );
                         }
                     }
-                    
+
                     // add the schema to the schemaLoader
                     schemaLoader.addSchema( schema );
                 }
@@ -618,7 +599,7 @@ public class DefaultSchemaManager implem
         {
             return true;
         }
-        
+
         Schema[] schemas = toArray( schemaNames );
 
         return load( schemas );
@@ -661,7 +642,7 @@ public class DefaultSchemaManager implem
         else
         {
             LOG.info( "Loading {} enabled schema: \n{}", schema.getSchemaName(), schema );
-            
+
             // Check that the dependencies, if any, are correct
             if ( schema.getDependencies() != null )
             {
@@ -692,6 +673,8 @@ public class DefaultSchemaManager implem
      * - isRelaxed
      * - disabledAccepted
      */
+    // False positive
+    @SuppressWarnings("PMD.UnusedPrivateMethod")
     private boolean unload( Registries registries, Schema schema ) throws Exception
     {
         if ( schema == null )
@@ -749,12 +732,14 @@ 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() )
-    	{
+        if ( !schemaLoader.loadDitContentRules( schema ).isEmpty() )
+        {
             throw new NotImplementedException( I18n.err( I18n.ERR_11003 ) );
-    	}
+        }
         // for ( Entry entry : schemaLoader.loadDitContentRules( schema ) )
         // {
         //     throw new NotImplementedException( I18n.err( I18n.ERR_11003 ) );
@@ -765,12 +750,14 @@ 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() )
-    	{
+        if ( !schemaLoader.loadDitStructureRules( schema ).isEmpty() )
+        {
             throw new NotImplementedException( I18n.err( I18n.ERR_11004 ) );
-    	}
+        }
         // for ( Entry entry : schemaLoader.loadDitStructureRules( schema ) )
         // {
         //     throw new NotImplementedException( I18n.err( I18n.ERR_11004 ) );
@@ -795,12 +782,14 @@ 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() )
-    	{
+        if ( !schemaLoader.loadMatchingRuleUses( schema ).isEmpty() )
+        {
             throw new NotImplementedException( I18n.err( I18n.ERR_11005 ) );
-    	}
+        }
         // for ( Entry entry : schemaLoader.loadMatchingRuleUses( schema ) )
         // {
         //     throw new NotImplementedException( I18n.err( I18n.ERR_11005 ) );
@@ -811,12 +800,14 @@ 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() )
-    	{
+        if ( !schemaLoader.loadNameForms( schema ).isEmpty() )
+        {
             throw new NotImplementedException( I18n.err( I18n.ERR_11006 ) );
-    	}
+        }
         // for ( Entry entry : schemaLoader.loadNameForms( schema ) )
         // {
         //     throw new NotImplementedException( I18n.err( I18n.ERR_11006 ) );
@@ -969,7 +960,7 @@ public class DefaultSchemaManager implem
             {
                 load( registries, schema );
             }
-            
+
             return true;
         }
         else
@@ -978,7 +969,7 @@ public class DefaultSchemaManager implem
             {
                 schema.disable();
             }
-            
+
             return false;
         }
     }
@@ -1190,7 +1181,7 @@ public class DefaultSchemaManager implem
         {
             errors.clear();
         }
-        
+
         // Work on a cloned and relaxed registries
         Registries clonedRegistries = cloneRegistries();
         clonedRegistries.setRelaxed();
@@ -1218,18 +1209,18 @@ public class DefaultSchemaManager implem
                 for ( Schema schema : schemas )
                 {
                     unload( registries, schema );
-                    
+
                     // Update the schema dependences
                     for ( String dep : schema.getDependencies() )
                     {
                         Set<String> deps = schemaDependences.get( dep );
-                        
+
                         if ( deps != null )
                         {
                             deps.remove( schema.getSchemaName() );
                         }
                     }
-                    
+
                     schemaLoader.removeSchema( schema );
                 }
 
@@ -1555,8 +1546,8 @@ public class DefaultSchemaManager implem
 
         return false;
     }
-    
-    
+
+
     /**
      * Get the inner SchemaObject if it's not a C/N/SC
      */
@@ -1614,8 +1605,8 @@ public class DefaultSchemaManager implem
             else
             {
                 // We have an invalid SchemaObject, no need to go any further
-                Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
-                		I18n.err( I18n.ERR_11007, schemaObject.getOid() ) );
+                Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err(
+                    I18n.ERR_11007, schemaObject.getOid() ) );
                 errors.add( error );
             }
         }
@@ -1656,8 +1647,7 @@ public class DefaultSchemaManager implem
             // The new schemaObject's OID must not already exist
             if ( checkOidExist( copy ) )
             {
-                Throwable error = new LdapProtocolErrorException(
-                		I18n.err( I18n.ERR_11008, schemaObject.getOid() ) );
+                Throwable error = new LdapProtocolErrorException( I18n.err( I18n.ERR_11008, schemaObject.getOid() ) );
                 errors.add( error );
 
                 return false;
@@ -1669,8 +1659,8 @@ public class DefaultSchemaManager implem
             if ( schemaName == null )
             {
                 // The schema associated with the SchemzaObject does not exist. This is not valid.
-                Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_11009, schemaObject.getOid(),
-                        		copy.getSchemaName() ) );
+                Throwable error = new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err(
+                    I18n.ERR_11009, schemaObject.getOid(), copy.getSchemaName() ) );
                 errors.add( error );
 
                 return false;
@@ -1759,8 +1749,7 @@ public class DefaultSchemaManager implem
             // The new schemaObject's OID must exist
             if ( !checkOidExist( schemaObject ) )
             {
-                Throwable error = new LdapProtocolErrorException( 
-                		I18n.err( I18n.ERR_11011, schemaObject.getOid() ) );
+                Throwable error = new LdapProtocolErrorException( I18n.err( I18n.ERR_11011, schemaObject.getOid() ) );
                 errors.add( error );
                 return false;
             }
@@ -2005,7 +1994,7 @@ public class DefaultSchemaManager implem
         return !isRelaxed;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */

Propchange: directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 19 19:03:51 2010
@@ -1,3 +1,3 @@
 /directory/shared/branches/shared-replication/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:749791-764113
 /directory/shared/branches/shared-schema/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:806622-896441
-/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:806622-894844
+/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:806622-894844,945830-946334

Modified: directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/LdifSchemaLoaderTest.java Wed May 19 19:03:51 2010
@@ -32,7 +32,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
 import org.apache.directory.shared.ldap.schema.manager.impl.DefaultSchemaManager;
-import org.apache.directory.shared.ldap.util.ExceptionUtils;
+import org.apache.directory.shared.ldap.util.LdapExceptionUtils;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -87,7 +87,7 @@ public class LdifSchemaLoaderTest
         
         if ( !loaded )
         {
-            fail( "Schema load failed : " + ExceptionUtils.printErrors( sm.getErrors() ) );
+            fail( "Schema load failed : " + LdapExceptionUtils.printErrors( sm.getErrors() ) );
         }
         
         assertTrue( sm.getRegistries().getAttributeTypeRegistry().contains( "cn" ) );

Modified: directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/DefaultSchemaLdifExtractor.java Wed May 19 19:03:51 2010
@@ -125,13 +125,10 @@ public class DefaultSchemaLdifExtractor 
      */
     public void extractOrCopy( boolean overwrite ) throws IOException
     {
-        if ( !outputDirectory.exists() )
+        if ( !outputDirectory.exists() && !outputDirectory.mkdirs() )
         {
-            if ( !outputDirectory.mkdirs() )
-            {
-                throw new IOException( I18n.err( I18n.ERR_09001_DIRECTORY_CREATION_FAILED, outputDirectory
-                    .getAbsolutePath() ) );
-            }
+            throw new IOException( I18n.err( I18n.ERR_09001_DIRECTORY_CREATION_FAILED, outputDirectory
+                .getAbsolutePath() ) );
         }
 
         File schemaDirectory = new File( outputDirectory, SCHEMA_SUBDIR );
@@ -192,13 +189,10 @@ public class DefaultSchemaLdifExtractor 
     {
         LOG.debug( "copyFile(): source = {}, destination = {}", source, destination );
 
-        if ( !destination.getParentFile().exists() )
+        if ( !destination.getParentFile().exists() && !destination.getParentFile().mkdirs() )
         {
-            if ( !destination.getParentFile().mkdirs() )
-            {
-                throw new IOException( I18n.err( I18n.ERR_09001_DIRECTORY_CREATION_FAILED, destination.getParentFile()
-                    .getAbsolutePath() ) );
-            }
+            throw new IOException( I18n.err( I18n.ERR_09001_DIRECTORY_CREATION_FAILED, destination.getParentFile()
+                .getAbsolutePath() ) );
         }
 
         if ( !source.getParentFile().exists() )
@@ -409,13 +403,10 @@ public class DefaultSchemaLdifExtractor 
                 return;
             }
 
-            if ( !destination.getParentFile().exists() )
+            if ( !destination.getParentFile().exists() && !destination.getParentFile().mkdirs() )
             {
-                if ( !destination.getParentFile().mkdirs() )
-                {
-                    throw new IOException( I18n.err( I18n.ERR_09001_DIRECTORY_CREATION_FAILED, destination
-                        .getParentFile().getAbsolutePath() ) );
-                }
+                throw new IOException( I18n.err( I18n.ERR_09001_DIRECTORY_CREATION_FAILED, destination
+                    .getParentFile().getAbsolutePath() ) );
             }
 
             FileOutputStream out = new FileOutputStream( destination );

Modified: directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/ResourceMap.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/ResourceMap.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/ResourceMap.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/java/org/apache/directory/shared/ldap/schema/ldif/extractor/impl/ResourceMap.java Wed May 19 19:03:51 2010
@@ -22,7 +22,6 @@ package org.apache.directory.shared.ldap
 
 import java.io.File;
 import java.io.IOException;
-import java.net.URL;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;

Modified: directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.100.ldif
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/resources/schema/ou%3Dschema/cn%3Dadsconfig/ou%3Dobjectclasses/m-oid%3D1.3.6.1.4.1.18060.0.4.1.3.100.ldif?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.100.ldif (original)
+++ directory/shared/branches/xdbm-refactoring/ldap-schema/src/main/resources/schema/ou=schema/cn=adsconfig/ou=objectclasses/m-oid=1.3.6.1.4.1.18060.0.4.1.3.100.ldif Wed May 19 19:03:51 2010
@@ -1,12 +1,10 @@
 version: 1
-dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.100, ou=objectClasses, cn=adsconfig, ou=sche
- ma
+dn: m-oid=1.3.6.1.4.1.18060.0.4.1.3.100, ou=objectClasses, cn=adsconfig, ou=schema
 createtimestamp: 20100111145217Z
 m-must: ads-directoryServiceId
 m-must: ads-dsInterceptors
 m-must: ads-dsPartitions
 m-must: ads-dsReplicaId
-m-must: ads-dsWorkingDirectory
 m-oid: 1.3.6.1.4.1.18060.0.4.1.3.100
 entrycsn: 20100111202217.860000Z#000000#000#000000
 m-description: The DirectoryService ObjectClass

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java Wed May 19 19:03:51 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/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapTransformer.java Wed May 19 19:03:51 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/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java Wed May 19 19:03:51 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/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/AndNode.java Wed May 19 19:03:51 2010
@@ -53,15 +53,6 @@ public class AndNode extends BranchNode
 
     
     /**
-     * Clone the AndNode
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-
-
-    /**
      * Creates an empty AndNode
      */
     public AndNode()

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ApproximateNode.java Wed May 19 19:03:51 2010
@@ -42,15 +42,6 @@ public class ApproximateNode<T> extends 
 
     
     /**
-     * Return a cloned node
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-    
-    
-    /**
      * @see Object#toString()
      * @return A string representing the AndNode
      */

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/EqualityNode.java Wed May 19 19:03:51 2010
@@ -43,17 +43,6 @@ public class EqualityNode<T> extends Sim
     }
 
     /**
-     * Makes a full clone in new memory space of the current node and children
-     * 
-     * @return the clone
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-
-
-    /**
      * Creates a new Equality object.
      * 
      * @param attribute the attribute name

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/FilterParser.java Wed May 19 19:03:51 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,9 +211,8 @@ 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
     {
-        int start = pos.start;
         char c = StringTools.charAt( filter, pos.start );
         
         // Create a buffer big enough to contain the value once converted
@@ -275,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/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/GreaterEqNode.java Wed May 19 19:03:51 2010
@@ -43,16 +43,6 @@ public class GreaterEqNode<T> extends Si
     }
 
     /**
-     * Makes a full clone in new memory space of the current node and children
-     * 
-     * @return the clone
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-
-    /**
      * @see Object#toString()
      * @return A string representing the AndNode
      */

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LeafNode.java Wed May 19 19:03:51 2010
@@ -45,17 +45,6 @@ public class LeafNode extends AbstractEx
     }
     
     /**
-     * Makes a full clone in new memory space of the current node and children
-     * 
-     * @return the clone
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-    
-
-    /**
      * Gets whether this node is a leaf - the answer is always true here.
      * 
      * @return true always

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/LessEqNode.java Wed May 19 19:03:51 2010
@@ -43,16 +43,6 @@ public class LessEqNode<T> extends Simpl
     }
 
     /**
-     * Makes a full clone in new memory space of the current node and children
-     * 
-     * @return the clone
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-
-    /**
      * @see Object#toString()
      * @return A string representing the AndNode
      */

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/NotNode.java Wed May 19 19:03:51 2010
@@ -68,16 +68,6 @@ public class NotNode extends BranchNode
 
     
     /**
-     * Clone the Node
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-    
-
-
-    /**
      * Creates an empty NotNode
      */
     public NotNode()

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/OrNode.java Wed May 19 19:03:51 2010
@@ -54,15 +54,6 @@ public class OrNode extends BranchNode
 
     
     /**
-     * Clone the Node
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-
-
-    /**
      * Creates an empty OrNode
      */
     public OrNode()

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/PresenceNode.java Wed May 19 19:03:51 2010
@@ -41,14 +41,6 @@ public final class PresenceNode extends 
 
     
     /**
-     * Clone the Node
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }
-
-    /**
      * @see java.lang.Object#toString()
      * @return A string representing the AndNode
      */

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/ScopeNode.java Wed May 19 19:03:51 2010
@@ -59,17 +59,6 @@ public class ScopeNode extends AbstractE
     }
 
     /**
-     * Makes a full clone in new memory space of the current node and children
-     * 
-     * @return the clone
-     */
-    @Override public ExprNode clone()
-    {
-        return super.clone();
-    }    
-
-
-    /**
      * Always returns true since a scope node has no children.
      * 
      * @see ExprNode#isLeaf()

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/filter/SimpleNode.java Wed May 19 19:03:51 2010
@@ -60,7 +60,7 @@ public abstract class SimpleNode<T> exte
 
     
     /**
-     * Clone the Node
+     * Makes a full clone in new memory space of the current node and children
      */
     @Override public ExprNode clone()
     {

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java Wed May 19 19:03:51 2010
@@ -99,9 +99,12 @@ public class AbstractAbandonableRequest 
         } );
     }
 
-    
+
+    // False positive
+    @SuppressWarnings("PMD.UselessOverridingMethod")
     class RequestObservable extends Observable
     {
+        @Override
         public void setChanged()
         {
             super.setChanged();

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponseImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponseImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponseImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponseImpl.java Wed May 19 19:03:51 2010
@@ -51,7 +51,7 @@ public class BindResponseImpl extends In
      * @param id
      *            the session unique message id
      */
-    public BindResponseImpl(final int id)
+    public BindResponseImpl( final int id )
     {
         super( id, TYPE );
     }
@@ -75,7 +75,7 @@ public class BindResponseImpl extends In
             return null;
         }
 
-        final byte[] copy = new byte[ serverSaslCreds.length ];
+        final byte[] copy = new byte[serverSaslCreds.length];
         System.arraycopy( serverSaslCreds, 0, copy, 0, serverSaslCreds.length );
         return copy;
     }
@@ -93,9 +93,11 @@ public class BindResponseImpl extends In
     {
         if ( serverSaslCreds != null )
         {
-            this.serverSaslCreds = new byte[ serverSaslCreds.length ];
+            this.serverSaslCreds = new byte[serverSaslCreds.length];
             System.arraycopy( serverSaslCreds, 0, this.serverSaslCreds, 0, serverSaslCreds.length );
-        } else {
+        }
+        else
+        {
             this.serverSaslCreds = null;
         }
     }
@@ -132,7 +134,7 @@ public class BindResponseImpl extends In
 
         InternalBindResponse response = ( InternalBindResponse ) obj;
         byte[] creds = response.getServerSaslCreds();
-        
+
         if ( serverSaslCreds == null )
         {
             if ( creds != null )
@@ -144,7 +146,7 @@ public class BindResponseImpl extends In
         {
             return false;
         }
-        
+
         return Arrays.equals( serverSaslCreds, creds );
     }
 
@@ -162,7 +164,8 @@ public class BindResponseImpl extends In
 
         if ( serverSaslCreds != null )
         {
-            sb.append( "        Server sasl credentials : '" ).append( StringTools.dumpBytes( serverSaslCreds ) ).append( "'\n" );
+            sb.append( "        Server sasl credentials : '" ).append( StringTools.dumpBytes( serverSaslCreds ) )
+                .append( "'\n" );
         }
 
         return sb.toString();

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java Wed May 19 19:03:51 2010
@@ -197,6 +197,36 @@ public class CompareRequestImpl extends 
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( name != null )
+        {
+            hash = hash * 17 + name.hashCode();
+        }
+        if ( attrId != null )
+        {
+            hash = hash * 17 + attrId.hashCode();
+        }
+        if ( attrVal != null )
+        {
+            hash = hash * 17 + attrVal.hashCode();
+        }
+        Value<?> reqVal = getAssertionValue();
+        if ( reqVal != null )
+        {
+            hash = hash * 17 + reqVal.hashCode();
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if an object is equivalent to this CompareRequest.
      * 
      * @param obj the obj to compare with this CompareRequest
@@ -282,7 +312,7 @@ public class CompareRequestImpl extends 
         sb.append( "        Entry : '" ).append( name.toString() ).append( "'\n" );
         sb.append( "        Attribute description : '" ).append( attrId ).append( "'\n" );
         sb.append( "        Attribute value : '" );
-        
+
         if ( !attrVal.isBinary() )
         {
             sb.append( attrVal.get() );
@@ -290,8 +320,8 @@ public class CompareRequestImpl extends 
         else
         {
             byte[] binVal = attrVal.getBytes();
-            sb.append( StringTools.utf8ToString( binVal ) ).append( '/' ).append(
-                StringTools.dumpBytes( binVal ) ).append( "'\n" );
+            sb.append( StringTools.utf8ToString( binVal ) ).append( '/' ).append( StringTools.dumpBytes( binVal ) )
+                .append( "'\n" );
         }
 
         return sb.toString();

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java Wed May 19 19:03:51 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteResponse;
@@ -53,7 +54,7 @@ public class DeleteRequestImpl extends A
      * @param id
      *            the sequential message identifier
      */
-    public DeleteRequestImpl(final int id)
+    public DeleteRequestImpl( final int id )
     {
         super( id, TYPE );
     }
@@ -121,6 +122,23 @@ public class DeleteRequestImpl extends A
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( name != null )
+        {
+            hash = hash * 17 + name.hashCode();
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if an object is equivalent to this DeleteRequest. First
      * there's a quick test to see if the obj is the same object as this one -
      * if so true is returned. Next if the super method fails false is returned.

Modified: directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java?rev=946342&r1=946341&r2=946342&view=diff
==============================================================================
--- directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java (original)
+++ directory/shared/branches/xdbm-refactoring/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java Wed May 19 19:03:51 2010
@@ -62,7 +62,7 @@ public class ExtendedRequestImpl extends
      * @param id
      *            the sequential message identifier
      */
-    public ExtendedRequestImpl(final int id)
+    public ExtendedRequestImpl( final int id )
     {
         super( id, TYPE, true );
     }
@@ -110,7 +110,7 @@ public class ExtendedRequestImpl extends
             return null;
         }
 
-        final byte[] copy = new byte[ payload.length ];
+        final byte[] copy = new byte[payload.length];
         System.arraycopy( payload, 0, copy, 0, payload.length );
         return copy;
     }
@@ -126,9 +126,11 @@ public class ExtendedRequestImpl extends
     {
         if ( payload != null )
         {
-            this.payload = new byte[ payload.length ];
+            this.payload = new byte[payload.length];
             System.arraycopy( payload, 0, this.payload, 0, payload.length );
-        } else {
+        }
+        else
+        {
             this.payload = null;
         }
     }
@@ -167,6 +169,27 @@ public class ExtendedRequestImpl extends
 
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public int hashCode()
+    {
+        int hash = 37;
+        if ( oid != null )
+        {
+            hash = hash * 17 + oid.hashCode();
+        }
+        if ( payload != null )
+        {
+            hash = hash * 17 + Arrays.hashCode( payload );
+        }
+        hash = hash * 17 + super.hashCode();
+
+        return hash;
+    }
+
+
+    /**
      * Checks to see if an object equals this ExtendedRequest.
      * 
      * @param obj
@@ -184,14 +207,14 @@ public class ExtendedRequestImpl extends
         {
             return false;
         }
-        
+
         if ( !( obj instanceof InternalExtendedRequest ) )
         {
             return false;
         }
 
         InternalExtendedRequest req = ( InternalExtendedRequest ) obj;
-        
+
         if ( ( oid != null ) && ( req.getOid() == null ) )
         {
             return false;
@@ -202,7 +225,7 @@ public class ExtendedRequestImpl extends
             return false;
         }
 
-        if ( ( oid != null ) && ( req.getOid() != null ) &&  !oid.equals( req.getOid() ) )
+        if ( ( oid != null ) && ( req.getOid() != null ) && !oid.equals( req.getOid() ) )
         {
             return false;
         }



Mime
View raw message