Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DD099B51 for ; Tue, 24 Jan 2012 17:46:24 +0000 (UTC) Received: (qmail 13163 invoked by uid 500); 24 Jan 2012 17:46:23 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 13102 invoked by uid 500); 24 Jan 2012 17:46:23 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 13095 invoked by uid 99); 24 Jan 2012 17:46:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jan 2012 17:46:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jan 2012 17:46:19 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BCD7C2388C42 for ; Tue, 24 Jan 2012 17:44:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1235374 [25/27] - in /directory/shared/trunk: ldap/model/src/main/java/org/apache/directory/shared/ldap/model/constants/ ldap/model/src/main/java/org/apache/directory/shared/ldap/model/csn/ ldap/model/src/main/java/org/apache/directory/sha... Date: Tue, 24 Jan 2012 17:44:32 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120124174458.BCD7C2388C42@eris.apache.org> Modified: directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java (original) +++ directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerDelTest.java Tue Jan 24 17:44:03 2012 @@ -129,7 +129,7 @@ public class SchemaManagerDelTest } } - + private boolean isComparatorPresent( SchemaManager schemaManager, String oid ) { try @@ -144,7 +144,7 @@ public class SchemaManagerDelTest } } - + private boolean isNormalizerPresent( SchemaManager schemaManager, String oid ) { try @@ -173,8 +173,8 @@ public class SchemaManagerDelTest return false; } } - - + + private boolean isSyntaxPresent( SchemaManager schemaManager, String oid ) { try @@ -189,7 +189,7 @@ public class SchemaManagerDelTest } } - + private boolean isSyntaxCheckerPresent( SchemaManager schemaManager, String oid ) { try @@ -356,7 +356,7 @@ public class SchemaManagerDelTest lc = schemaManager.lookupComparatorRegistry( "0.1.1" ); assertNotNull( lc ); assertTrue( schemaManager.delete( lc ) ); - + try { schemaManager.lookupComparatorRegistry( "0.1.1" ); @@ -398,7 +398,7 @@ public class SchemaManagerDelTest int goidSize = schemaManager.getGlobalOidRegistry().size(); LdapComparator lc = schemaManager.lookupComparatorRegistry( "2.5.13.0" ); - + // shouldn't be deleted cause there is a MR associated with it assertFalse( schemaManager.delete( lc ) ); @@ -423,7 +423,7 @@ public class SchemaManagerDelTest int ctrSize = schemaManager.getComparatorRegistry().size(); int mrrSize = schemaManager.getMatchingRuleRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + String OID = "2.5.13.33"; // Check that the MR and C are present @@ -432,7 +432,7 @@ public class SchemaManagerDelTest // Now try to remove the C LdapComparator lc = schemaManager.lookupComparatorRegistry( OID ); - + // shouldn't be deleted cause there is a MR associated with it assertFalse( schemaManager.delete( lc ) ); @@ -448,7 +448,7 @@ public class SchemaManagerDelTest assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); assertFalse( isMatchingRulePresent( schemaManager, OID ) ); - + // and try to delete the Comparator again assertTrue( schemaManager.delete( lc ) ); @@ -456,7 +456,7 @@ public class SchemaManagerDelTest assertEquals( ctrSize - 1, schemaManager.getComparatorRegistry().size() ); assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); } - + //========================================================================= // DITContentRule deletion tests @@ -471,37 +471,37 @@ public class SchemaManagerDelTest //========================================================================= // MatchingRule deletion tests //------------------------------------------------------------------------- - + @Test public void testDeleteExistingMatchingRule() throws Exception { SchemaManager schemaManager = loadSchema( "system" ); int mrSize = schemaManager.getMatchingRuleRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + MatchingRule mr = new MatchingRule( "2.5.13.33" ); assertTrue( schemaManager.delete( mr ) ); - + assertEquals( mrSize - 1, schemaManager.getMatchingRuleRegistry().size() ); assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteNonExistingMatchingRule() throws Exception { SchemaManager schemaManager = loadSchema( "system" ); int mrSize = schemaManager.getMatchingRuleRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + MatchingRule mr = new MatchingRule( "0.1.1" ); assertFalse( schemaManager.delete( mr ) ); - + assertEquals( mrSize, schemaManager.getMatchingRuleRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteExistingMatchingRuleUsedByAttributeType() throws Exception { @@ -512,12 +512,12 @@ public class SchemaManagerDelTest // AT with OID 2.5.18.4 has syntax 1.3.6.1.4.1.1466.115.121.1.12 which is used by MR 2.5.13.1 MatchingRule mr = new MatchingRule( "2.5.13.1" ); assertFalse( schemaManager.delete( mr ) ); - + assertEquals( mrSize, schemaManager.getMatchingRuleRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + /** * Check that a MatcingRule which has been used by a deleted AttributeType * can be removed @@ -529,7 +529,7 @@ public class SchemaManagerDelTest int mrrSize = schemaManager.getMatchingRuleRegistry().size(); int atrSize = schemaManager.getAttributeTypeRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + String AT_OID = "2.5.18.9"; String MR_OID = "2.5.13.13"; @@ -539,7 +539,7 @@ public class SchemaManagerDelTest // Now try to remove the MR MatchingRule matchingRule = schemaManager.lookupMatchingRuleRegistry( MR_OID ); - + // shouldn't be deleted cause there is a AT associated with it assertFalse( schemaManager.delete( matchingRule ) ); @@ -555,7 +555,7 @@ public class SchemaManagerDelTest assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); assertFalse( isAttributeTypePresent( schemaManager, AT_OID ) ); - + // and try to delete the MatchingRule again assertTrue( schemaManager.delete( matchingRule ) ); @@ -611,8 +611,8 @@ public class SchemaManagerDelTest assertEquals( nrSize, schemaManager.getNormalizerRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - - + + @Test public void testDeleteNonExistingNormalizer() throws Exception { @@ -621,7 +621,7 @@ public class SchemaManagerDelTest int goidSize = schemaManager.getGlobalOidRegistry().size(); Normalizer nr = new BooleanNormalizer(); - nr.setOid( "0.0" ); + nr.setOid( "0.0" ); assertFalse( schemaManager.delete( nr ) ); List errors = schemaManager.getErrors(); @@ -631,7 +631,7 @@ public class SchemaManagerDelTest assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteExistingNormalizerUsedByMatchingRule() throws Exception { @@ -652,7 +652,7 @@ public class SchemaManagerDelTest assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + /** * Check that a Normalizer which has been used by a deleted MatchingRule * can be removed @@ -664,7 +664,7 @@ public class SchemaManagerDelTest int nrSize = schemaManager.getNormalizerRegistry().size(); int mrrSize = schemaManager.getMatchingRuleRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + String OID = "2.5.13.33"; // Check that the MR and N are present @@ -673,7 +673,7 @@ public class SchemaManagerDelTest // Now try to remove the N Normalizer normalizer = schemaManager.lookupNormalizerRegistry( OID ); - + // shouldn't be deleted cause there is a MR associated with it assertFalse( schemaManager.delete( normalizer ) ); @@ -689,7 +689,7 @@ public class SchemaManagerDelTest assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); assertFalse( isMatchingRulePresent( schemaManager, OID ) ); - + // and try to delete the normalizer again assertTrue( schemaManager.delete( normalizer ) ); @@ -697,7 +697,7 @@ public class SchemaManagerDelTest assertEquals( nrSize - 1, schemaManager.getNormalizerRegistry().size() ); assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); } - + //========================================================================= // ObjectClass deletion tests @@ -709,25 +709,25 @@ public class SchemaManagerDelTest SchemaManager schemaManager = loadSchema( "system" ); int ocSize = schemaManager.getObjectClassRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + ObjectClass oc = new ObjectClass( "2.5.17.2" ); - + assertTrue( schemaManager.delete( oc ) ); - + assertEquals( ocSize - 1, schemaManager.getObjectClassRegistry().size() ); assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); - + try { schemaManager.lookupObjectClassRegistry( "2.5.17.2" ); fail(); } - catch( Exception e ) + catch ( Exception e ) { // expected } } - + @Test public void testDeleteNonExistingObjectClass() throws Exception @@ -735,15 +735,15 @@ public class SchemaManagerDelTest SchemaManager schemaManager = loadSchema( "system" ); int ocSize = schemaManager.getObjectClassRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + ObjectClass oc = new ObjectClass( "0.1.1" ); - + assertFalse( schemaManager.delete( oc ) ); - + assertEquals( ocSize, schemaManager.getObjectClassRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteExistingObjectClassUsedByAnotherObjectClass() throws Exception @@ -751,12 +751,12 @@ public class SchemaManagerDelTest SchemaManager schemaManager = loadSchema( "system" ); int ocSize = schemaManager.getObjectClassRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + ObjectClass oc = new ObjectClass( "2.5.6.0" ); - + // shouldn't delete the 'top' OC assertFalse( schemaManager.delete( oc ) ); - + List errors = schemaManager.getErrors(); assertFalse( errors.isEmpty() ); assertTrue( errors.get( 0 ) instanceof LdapProtocolErrorException ); @@ -764,12 +764,12 @@ public class SchemaManagerDelTest assertEquals( ocSize, schemaManager.getObjectClassRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + //========================================================================= // Syntax deletion tests //------------------------------------------------------------------------- - + @Test public void testDeleteExistingSyntax() throws Exception { @@ -780,9 +780,9 @@ public class SchemaManagerDelTest // delete a existing syntax not used by AT and MR LdapSyntax syntax = schemaManager.lookupLdapSyntaxRegistry( "1.3.6.1.4.1.1466.115.121.1.10" ); assertTrue( schemaManager.delete( syntax ) ); - + assertEquals( sSize - 1, schemaManager.getLdapSyntaxRegistry().size() ); - assertEquals( goidSize -1, schemaManager.getGlobalOidRegistry().size() ); + assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); // add a syntax and then delete (should behave same as above ) syntax = new LdapSyntax( "0.1.1" ); @@ -790,7 +790,7 @@ public class SchemaManagerDelTest assertEquals( sSize, schemaManager.getLdapSyntaxRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); - + syntax = schemaManager.lookupLdapSyntaxRegistry( "0.1.1" ); assertTrue( schemaManager.delete( syntax ) ); @@ -799,16 +799,16 @@ public class SchemaManagerDelTest schemaManager.lookupLdapSyntaxRegistry( "0.1.1" ); fail( "shouldn't find the syntax" ); } - catch( Exception e ) + catch ( Exception e ) { // expected behaviour } - + assertEquals( sSize - 1, schemaManager.getLdapSyntaxRegistry().size() ); assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteNonExistingSyntax() throws Exception { @@ -817,14 +817,14 @@ public class SchemaManagerDelTest int goidSize = schemaManager.getGlobalOidRegistry().size(); LdapSyntax syntax = new LdapSyntax( "0.1.1" ); - + assertFalse( schemaManager.delete( syntax ) ); - + assertEquals( sSize, schemaManager.getLdapSyntaxRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteExistingSyntaxUsedByMatchingRule() throws Exception { @@ -836,35 +836,35 @@ public class SchemaManagerDelTest //1.3.6.1.4.1.1466.115.121.1.26 is used by MR 1.3.6.1.4.1.1466.109.114.2 LdapSyntax syntax = new LdapSyntax( "1.3.6.1.4.1.1466.115.121.1.26" ); assertFalse( schemaManager.delete( syntax ) ); - + // syntax 1.3.6.1.4.1.1466.115.121.1.12 is used by MR 2.5.13.1 and many AT syntax = new LdapSyntax( "1.3.6.1.4.1.1466.115.121.1.12" ); - + assertFalse( schemaManager.delete( syntax ) ); - + assertEquals( sSize, schemaManager.getLdapSyntaxRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteExistingSyntaxUsedByAttributeType() throws Exception { - // syntax 1.3.6.1.4.1.1466.115.121.1.15 is used by AT 1.3.6.1.1.4 + // syntax 1.3.6.1.4.1.1466.115.121.1.15 is used by AT 1.3.6.1.1.4 SchemaManager schemaManager = loadSchema( "system" ); int sSize = schemaManager.getLdapSyntaxRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); LdapSyntax syntax = new LdapSyntax( "1.3.6.1.4.1.1466.115.121.1.15" ); - + assertFalse( schemaManager.delete( syntax ) ); - + assertEquals( sSize, schemaManager.getLdapSyntaxRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - - + + /** * Check that a Syntax which has been used by a deleted MatchingRule * can be removed @@ -876,9 +876,9 @@ public class SchemaManagerDelTest int srSize = schemaManager.getLdapSyntaxRegistry().size(); int mrrSize = schemaManager.getMatchingRuleRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + String MR_OID = "2.5.13.11"; - String S_OID = "1.3.6.1.4.1.1466.115.121.1.41"; + String S_OID = "1.3.6.1.4.1.1466.115.121.1.41"; // Check that the MR and S are present assertTrue( isMatchingRulePresent( schemaManager, MR_OID ) ); @@ -886,7 +886,7 @@ public class SchemaManagerDelTest // Now try to remove the S LdapSyntax syntax = schemaManager.lookupLdapSyntaxRegistry( S_OID ); - + // shouldn't be deleted cause there is a MR associated with it assertFalse( schemaManager.delete( syntax ) ); @@ -902,7 +902,7 @@ public class SchemaManagerDelTest assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); assertFalse( isMatchingRulePresent( schemaManager, MR_OID ) ); - + // and try to delete the syntax again assertTrue( schemaManager.delete( syntax ) ); @@ -923,9 +923,9 @@ public class SchemaManagerDelTest int srSize = schemaManager.getLdapSyntaxRegistry().size(); int atrSize = schemaManager.getAttributeTypeRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + String AT_OID = "1.3.6.1.4.1.1466.101.120.16"; - String S_OID = "1.3.6.1.4.1.1466.115.121.1.54"; + String S_OID = "1.3.6.1.4.1.1466.115.121.1.54"; // Check that the AT and S are present assertTrue( isAttributeTypePresent( schemaManager, AT_OID ) ); @@ -933,13 +933,13 @@ public class SchemaManagerDelTest // Now try to remove the S LdapSyntax syntax = schemaManager.lookupLdapSyntaxRegistry( S_OID ); - + // shouldn't be deleted cause there is a AT associated with it assertFalse( schemaManager.delete( syntax ) ); List errors = schemaManager.getErrors(); assertFalse( errors.isEmpty() ); - assertTrue( errors.get( 0 ) instanceof LdapProtocolErrorException); + assertTrue( errors.get( 0 ) instanceof LdapProtocolErrorException ); // Now delete the using AT : it should be OK AttributeType at = new AttributeType( AT_OID ); @@ -949,7 +949,7 @@ public class SchemaManagerDelTest assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); assertFalse( isAttributeTypePresent( schemaManager, AT_OID ) ); - + // and try to delete the syntax again assertTrue( schemaManager.delete( syntax ) ); @@ -970,7 +970,7 @@ public class SchemaManagerDelTest int scrSize = schemaManager.getSyntaxCheckerRegistry().size(); int srSize = schemaManager.getLdapSyntaxRegistry().size(); int goidSize = schemaManager.getGlobalOidRegistry().size(); - + String OID = "1.3.6.1.4.1.1466.115.121.1.33"; // Check that the S and SC are present @@ -979,7 +979,7 @@ public class SchemaManagerDelTest // Now try to remove the SC SyntaxChecker sc = schemaManager.lookupSyntaxCheckerRegistry( OID ); - + // shouldn't be deleted cause there is a S associated with it assertFalse( schemaManager.delete( sc ) ); @@ -995,7 +995,7 @@ public class SchemaManagerDelTest assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); assertFalse( isSyntaxPresent( schemaManager, OID ) ); - + // and try to delete the SC again assertTrue( schemaManager.delete( sc ) ); @@ -1003,12 +1003,12 @@ public class SchemaManagerDelTest assertEquals( scrSize - 1, schemaManager.getSyntaxCheckerRegistry().size() ); assertEquals( goidSize - 1, schemaManager.getGlobalOidRegistry().size() ); } - + //========================================================================= // SyntaxChecker deletion tests //------------------------------------------------------------------------- - + @Test public void testDeleteExistingSyntaxChecker() throws Exception { @@ -1040,8 +1040,8 @@ public class SchemaManagerDelTest assertEquals( scrSize, schemaManager.getSyntaxCheckerRegistry().size() ); assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - - + + @Test public void testDeleteNonExistingSyntaxChecker() throws Exception { @@ -1050,7 +1050,7 @@ public class SchemaManagerDelTest int goidSize = schemaManager.getGlobalOidRegistry().size(); SyntaxChecker sc = new BooleanSyntaxChecker(); - sc.setOid( "0.0" ); + sc.setOid( "0.0" ); assertFalse( schemaManager.delete( sc ) ); List errors = schemaManager.getErrors(); @@ -1060,7 +1060,7 @@ public class SchemaManagerDelTest assertEquals( goidSize, schemaManager.getGlobalOidRegistry().size() ); } - + @Test public void testDeleteExistingSyntaxCheckerUsedBySyntax() throws Exception { @@ -1069,7 +1069,7 @@ public class SchemaManagerDelTest int goidSize = schemaManager.getGlobalOidRegistry().size(); SyntaxChecker sc = schemaManager.lookupSyntaxCheckerRegistry( "1.3.6.1.4.1.1466.115.121.1.1" ); - + //FIXME should return false but is returning true assertFalse( schemaManager.delete( sc ) ); Modified: directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java (original) +++ directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerEnableDisableLoadTest.java Tue Jan 24 17:44:03 2012 @@ -63,23 +63,23 @@ public class SchemaManagerEnableDisableL private static String workingDirectory; // The schema repository - private static File schemaRepository; + private static File schemaRepository; // The schemaManager private SchemaManager schemaManager; // List of all the available schemas, enabled or disabled - private List allSchemas = Arrays.asList( "system", "core", "cosine", "inetorgperson", "apache", - "apachemeta", "collective", "java", "krb5kdc", "other", "nis", "autofs", - "apachedns", "dhcp", "samba", "corba", "adsconfig", "pwdpolicy" ); + private List allSchemas = Arrays.asList( "system", "core", "cosine", "inetorgperson", "apache", + "apachemeta", "collective", "java", "krb5kdc", "other", "nis", "autofs", + "apachedns", "dhcp", "samba", "corba", "adsconfig", "pwdpolicy" ); // List of all the enabled schemas - private List enabledSchemas = Arrays.asList( "system", "core", "cosine", "inetorgperson", "apache", - "apachemeta", "collective", "java", "krb5kdc", "other", "adsconfig", "pwdpolicy" ); + private List enabledSchemas = Arrays.asList( "system", "core", "cosine", "inetorgperson", "apache", + "apachemeta", "collective", "java", "krb5kdc", "other", "adsconfig", "pwdpolicy" ); // List of all the disabled schemas @SuppressWarnings("unused") - private List disabledSchemas = Arrays.asList( "nis", "autofs", "apachedns", "dhcp", "samba", "corba" ); + private List disabledSchemas = Arrays.asList( "nis", "autofs", "apachedns", "dhcp", "samba", "corba" ); @BeforeClass Modified: directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java (original) +++ directory/shared/trunk/ldap/schema/data/src/test/java/org/apache/directory/shared/ldap/schemaloader/SchemaManagerLoadTest.java Tue Jan 24 17:44:03 2012 @@ -175,7 +175,7 @@ public class SchemaManagerLoadTest // The schema repository private static File schemaRepository; - + @BeforeClass public static void setup() throws Exception @@ -527,7 +527,7 @@ public class SchemaManagerLoadTest assertTrue( schemaManager.load( "core" ) ); assertTrue( schemaManager.load( "cosine" ) ); assertFalse( schemaManager.load( "nis" ) ); - + AttributeType at = schemaManager.getAttributeType( "uidNumber" ); // if nis schema was loaded then the at will not be null assertNull( at ); @@ -664,9 +664,9 @@ public class SchemaManagerLoadTest { LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository ); SchemaManager schemaManager = new DefaultSchemaManager( loader ); - + assertTrue( schemaManager.load( "system" ) ); - + // Try to load a disabled schema when the registries does // ot allow disabled schema to be loaded assertFalse( schemaManager.load( "core", "nis", "cosine", "InetOrgPerson" ) ); @@ -728,8 +728,8 @@ public class SchemaManagerLoadTest assertNotNull( schemaManager.getRegistries().getLoadedSchema( "InetOrgPerson" ) ); assertNotNull( schemaManager.getRegistries().getLoadedSchema( "empty" ) ); } - - + + /** * Test that we can load a new schema */ @@ -756,8 +756,8 @@ public class SchemaManagerLoadTest assertEquals( 1, schemaManager.getRegistries().getLoadedSchemas().size() ); assertNotNull( schemaManager.getRegistries().getLoadedSchema( "dummy" ) ); } - - + + /** * Test that we can't load a new schema with bad dependencies */ @@ -785,9 +785,9 @@ public class SchemaManagerLoadTest assertEquals( 0, schemaManager.getRegistries().getLoadedSchemas().size() ); assertNull( schemaManager.getRegistries().getLoadedSchema( "dummy" ) ); } - - @Ignore( "loadDisabled() method need to be fixed" ) + + @Ignore("loadDisabled() method need to be fixed") @Test public void testLoadDisabled() throws Exception { @@ -797,7 +797,7 @@ public class SchemaManagerLoadTest assertTrue( schemaManager.loadDisabled( "nis" ) ); assertFalse( schemaManager.getErrors().isEmpty() ); - + AttributeType at = schemaManager.getAttributeType( "uidNumber" ); // if nis schema was loaded then the at will not be null assertNotNull( at ); Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ArrayEnumeration.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ArrayEnumeration.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ArrayEnumeration.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ArrayEnumeration.java Tue Jan 24 17:44:03 2012 @@ -45,13 +45,15 @@ public class ArrayEnumeration implements * @param array * the underlying array that is wrapped */ - public ArrayEnumeration(Object[] array) + public ArrayEnumeration( Object[] array ) { if ( array != null ) { - this.array = new Object[ array.length ]; + this.array = new Object[array.length]; System.arraycopy( array, 0, this.array, 0, array.length ); - } else { + } + else + { this.array = null; } } Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Base32.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Base32.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Base32.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Base32.java Tue Jan 24 17:44:03 2012 @@ -31,11 +31,12 @@ package org.apache.directory.shared.util public final class Base32 { /** The available characters */ - private static final byte[] CHARS = new byte[]{ - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', - 'Y', 'Z', '2', '3', '4', '5', '6', '7' }; + private static final byte[] CHARS = new byte[] + { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', '2', '3', '4', '5', '6', '7' }; /** @@ -54,51 +55,51 @@ public final class Base32 */ public static String encode( String str ) { - if ( Strings.isEmpty(str) ) + if ( Strings.isEmpty( str ) ) { return ""; } - - byte[] data = Strings.getBytesUtf8(str); + + byte[] data = Strings.getBytesUtf8( str ); int dataLength = data.length; int newLength = ( ( dataLength << 3 ) / 5 ) + ( ( dataLength % 5 ) == 0 ? 0 : 1 ); newLength += ( ( newLength % 8 == 0 ) ? 0 : 8 - newLength % 8 ); byte[] out = new byte[newLength]; - - int roundLength = (dataLength/5) * 5; + + int roundLength = ( dataLength / 5 ) * 5; int posOut = 0; int posIn = 0; - + if ( roundLength != 0 ) { for ( posIn = 0; posIn < roundLength; posIn += 5 ) { byte b0 = data[posIn]; - byte b1 = data[posIn+1]; - byte b2 = data[posIn+2]; - byte b3 = data[posIn+3]; - byte b4 = data[posIn+4]; - - out[posOut++] = CHARS[( b0 & 0xF8) >> 3]; - out[posOut++] = CHARS[( ( b0 & 0x07) << 2 ) | ( ( b1 & 0xC0 ) >> 6 ) ]; - out[posOut++] = CHARS[( b1 & 0x3E) >> 1]; - out[posOut++] = CHARS[( ( b1 & 0x01) << 4 ) | ( ( b2 & 0xF0 ) >> 4 ) ]; - out[posOut++] = CHARS[( ( b2 & 0x0F) << 1 ) | ( ( b3 & 0x80 ) >> 7 ) ]; - out[posOut++] = CHARS[( b3 & 0x7C) >> 2]; - out[posOut++] = CHARS[( ( b3 & 0x03) << 3 ) | ( ( b4 & 0x70 ) >> 5 )]; + byte b1 = data[posIn + 1]; + byte b2 = data[posIn + 2]; + byte b3 = data[posIn + 3]; + byte b4 = data[posIn + 4]; + + out[posOut++] = CHARS[( b0 & 0xF8 ) >> 3]; + out[posOut++] = CHARS[( ( b0 & 0x07 ) << 2 ) | ( ( b1 & 0xC0 ) >> 6 )]; + out[posOut++] = CHARS[( b1 & 0x3E ) >> 1]; + out[posOut++] = CHARS[( ( b1 & 0x01 ) << 4 ) | ( ( b2 & 0xF0 ) >> 4 )]; + out[posOut++] = CHARS[( ( b2 & 0x0F ) << 1 ) | ( ( b3 & 0x80 ) >> 7 )]; + out[posOut++] = CHARS[( b3 & 0x7C ) >> 2]; + out[posOut++] = CHARS[( ( b3 & 0x03 ) << 3 ) | ( ( b4 & 0x70 ) >> 5 )]; out[posOut++] = CHARS[b4 & 0x1F]; } } - + int remaining = dataLength - roundLength; - + switch ( remaining ) { - case 1 : + case 1: byte b0 = data[posIn++]; - - out[posOut++] = CHARS[( b0 & 0xF8) >> 3]; - out[posOut++] = CHARS[( ( b0 & 0x07) << 2 )]; + + out[posOut++] = CHARS[( b0 & 0xF8 ) >> 3]; + out[posOut++] = CHARS[( ( b0 & 0x07 ) << 2 )]; out[posOut++] = '='; out[posOut++] = '='; out[posOut++] = '='; @@ -107,52 +108,52 @@ public final class Base32 out[posOut++] = '='; break; - case 2 : + case 2: b0 = data[posIn++]; byte b1 = data[posIn++]; - out[posOut++] = CHARS[( b0 & 0xF8) >> 3]; - out[posOut++] = CHARS[( ( b0 & 0x07) << 2 ) | ( ( b1 & 0xC0 ) >> 6 ) ]; - out[posOut++] = CHARS[( b1 & 0x3E) >> 1]; - out[posOut++] = CHARS[( ( b1 & 0x01) << 4 )]; + out[posOut++] = CHARS[( b0 & 0xF8 ) >> 3]; + out[posOut++] = CHARS[( ( b0 & 0x07 ) << 2 ) | ( ( b1 & 0xC0 ) >> 6 )]; + out[posOut++] = CHARS[( b1 & 0x3E ) >> 1]; + out[posOut++] = CHARS[( ( b1 & 0x01 ) << 4 )]; out[posOut++] = '='; out[posOut++] = '='; out[posOut++] = '='; out[posOut++] = '='; break; - - case 3 : + + case 3: b0 = data[posIn++]; b1 = data[posIn++]; byte b2 = data[posIn++]; - out[posOut++] = CHARS[( b0 & 0xF8) >> 3]; - out[posOut++] = CHARS[( ( b0 & 0x07) << 2 ) | ( ( b1 & 0xC0 ) >> 6 ) ]; - out[posOut++] = CHARS[( b1 & 0x3E) >> 1]; - out[posOut++] = CHARS[( ( b1 & 0x01) << 4 ) | ( ( b2 & 0xF0 ) >> 4 ) ]; - out[posOut++] = CHARS[( ( b2 & 0x0F) << 1 ) ]; + out[posOut++] = CHARS[( b0 & 0xF8 ) >> 3]; + out[posOut++] = CHARS[( ( b0 & 0x07 ) << 2 ) | ( ( b1 & 0xC0 ) >> 6 )]; + out[posOut++] = CHARS[( b1 & 0x3E ) >> 1]; + out[posOut++] = CHARS[( ( b1 & 0x01 ) << 4 ) | ( ( b2 & 0xF0 ) >> 4 )]; + out[posOut++] = CHARS[( ( b2 & 0x0F ) << 1 )]; out[posOut++] = '='; out[posOut++] = '='; out[posOut++] = '='; break; - - case 4 : + + case 4: b0 = data[posIn++]; b1 = data[posIn++]; b2 = data[posIn++]; byte b3 = data[posIn++]; - out[posOut++] = CHARS[( b0 & 0xF8) >> 3]; - out[posOut++] = CHARS[( ( b0 & 0x07) << 2 ) | ( ( b1 & 0xC0 ) >> 6 ) ]; - out[posOut++] = CHARS[( b1 & 0x3E) >> 1]; - out[posOut++] = CHARS[( ( b1 & 0x01) << 4 ) | ( ( b2 & 0xF0 ) >> 4 ) ]; - out[posOut++] = CHARS[( ( b2 & 0x0F) << 1 ) | ( ( b3 & 0x80 ) >> 7 ) ]; - out[posOut++] = CHARS[( b3 & 0x7C) >> 2]; - out[posOut++] = CHARS[( ( b3 & 0x03) << 3 ) ]; + out[posOut++] = CHARS[( b0 & 0xF8 ) >> 3]; + out[posOut++] = CHARS[( ( b0 & 0x07 ) << 2 ) | ( ( b1 & 0xC0 ) >> 6 )]; + out[posOut++] = CHARS[( b1 & 0x3E ) >> 1]; + out[posOut++] = CHARS[( ( b1 & 0x01 ) << 4 ) | ( ( b2 & 0xF0 ) >> 4 )]; + out[posOut++] = CHARS[( ( b2 & 0x0F ) << 1 ) | ( ( b3 & 0x80 ) >> 7 )]; + out[posOut++] = CHARS[( b3 & 0x7C ) >> 2]; + out[posOut++] = CHARS[( ( b3 & 0x03 ) << 3 )]; out[posOut++] = '='; break; } - - return Strings.utf8ToString(out); + + return Strings.utf8ToString( out ); } } Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ByteBuffer.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ByteBuffer.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ByteBuffer.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/ByteBuffer.java Tue Jan 24 17:44:03 2012 @@ -19,6 +19,7 @@ */ package org.apache.directory.shared.util; + import org.apache.directory.shared.i18n.I18n; @@ -31,21 +32,21 @@ public class ByteBuffer { /** the default initial buffer size */ private static final int DEFAULT_INITIAL_SIZE = 10; - + /** the initial size of the buffer in number of bytes: also increment for allocations */ private final int initialSize; /** the position into the buffer */ private int pos = 0; /** the bytes of the buffer */ private byte[] buf; - - + + public ByteBuffer() { - this ( DEFAULT_INITIAL_SIZE ); + this( DEFAULT_INITIAL_SIZE ); } - - + + public ByteBuffer( int initialSize ) { if ( initialSize <= 0 ) @@ -55,32 +56,32 @@ public class ByteBuffer this.initialSize = initialSize; this.buf = new byte[initialSize]; } - - + + public final void clear() { pos = 0; } - - + + public final int position() { return pos; } - - + + public final int capacity() { return buf.length; } - - + + public final byte get( int ii ) { return buf[ii]; } - - + + /** * Get's the bytes, the backing store for this buffer. Note * that you need to use the position index to determine where @@ -90,8 +91,8 @@ public class ByteBuffer { return buf; } - - + + /** * Get's a copy of the bytes used. */ @@ -101,8 +102,8 @@ public class ByteBuffer System.arraycopy( buf, 0, copy, 0, pos ); return copy; } - - + + /** * Appends the bytes to this buffer. */ @@ -113,8 +114,8 @@ public class ByteBuffer append( b ); } } - - + + /** * Appends a byte to this buffer. */ @@ -124,12 +125,12 @@ public class ByteBuffer { growBuffer(); } - + buf[pos] = bite; pos++; } - - + + /** * Appends an int to this buffer. WARNING: the int is truncated to * a byte value. @@ -140,15 +141,15 @@ public class ByteBuffer { growBuffer(); } - + buf[pos] = ( byte ) val; pos++; } - - + + private void growBuffer() { - byte[] copy = new byte[buf.length+initialSize]; + byte[] copy = new byte[buf.length + initialSize]; System.arraycopy( buf, 0, copy, 0, pos ); this.buf = copy; } Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Chars.java Tue Jan 24 17:44:03 2012 @@ -38,15 +38,15 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false - }; + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false, + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false + }; /** <alpha-lower-case> ::= [0x61-0x7A] */ public static final boolean[] ALPHA_LOWER_CASE = { @@ -62,11 +62,11 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false - }; + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false + }; /** <alpha-upper-case> ::= [0x41-0x5A] */ public static final boolean[] ALPHA_UPPER_CASE = { @@ -78,15 +78,15 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false, + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - }; + }; /** <alpha-digit> | <digit> */ public static final boolean[] ALPHA_DIGIT = { @@ -96,17 +96,17 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - true, true, true, true, true, true, true, true, - true, true, false, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false - }; + true, true, true, true, true, true, true, true, + true, true, false, false, false, false, false, false, + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false, + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false + }; /** <alpha> | <digit> | '-' */ public static final boolean[] CHAR = { @@ -115,18 +115,18 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - false, false, false, false, false, true, false, false, - true, true, true, true, true, true, true, true, - true, true, false, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false, - false, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, true, true, true, true, true, - true, true, true, false, false, false, false, false - }; + false, false, false, false, false, true, false, false, + true, true, true, true, true, true, true, true, + true, true, false, false, false, false, false, false, + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false, + false, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, true, true, true, true, true, + true, true, true, false, false, false, false, false + }; /** '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' */ public static final boolean[] DIGIT = { @@ -136,8 +136,8 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - true, true, true, true, true, true, true, true, - true, true, false, false, false, false, false, false, + true, true, true, true, true, true, true, true, + true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, @@ -146,7 +146,7 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false - }; + }; /** <hex> ::= [0x30-0x39] | [0x41-0x46] | [0x61-0x66] */ public static final boolean[] HEX = { @@ -156,17 +156,18 @@ public final class Chars false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - true, true, true, true, true, true, true, true, - true, true, false, false, false, false, false, false, - false, true, true, true, true, true, true, false, + true, true, true, true, true, true, true, true, + true, true, false, false, false, false, false, false, + false, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, - false, true, true, true, true, true, true, false, + false, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }; + /* * * Test if the current character is equal to a specific character. * @@ -188,6 +189,7 @@ public final class Chars } } + /** * Test if the current character is equal to a specific character. * @@ -217,6 +219,7 @@ public final class Chars } } + /** * Test if the current character is equal to a specific character. * @@ -246,6 +249,7 @@ public final class Chars } } + /** * Test if the current character is equal to a specific character. * @@ -271,10 +275,11 @@ public final class Chars } else { - return ( ( bytes[ index ] | 0x20 ) & car ) == car; + return ( ( bytes[index] | 0x20 ) & car ) == car; } } + /** * Test if the current byte is an Alpha character : * <alpha> ::= [0x41-0x5A] | [0x61-0x7A] @@ -289,6 +294,7 @@ public final class Chars return ( ( c > 0 ) && ( c <= 127 ) && ALPHA[c] ); } + /** * Test if the current character is an Alpha character : * <alpha> ::= [0x41-0x5A] | [0x61-0x7A] @@ -303,6 +309,7 @@ public final class Chars return ( ( c > 0 ) && ( c <= 127 ) && ALPHA[c] ); } + /** * Test if the current character is an Alpha character : <alpha> ::= * [0x41-0x5A] | [0x61-0x7A] @@ -333,6 +340,7 @@ public final class Chars } } + /** * Test if the current character is an Alpha character : <alpha> ::= * [0x41-0x5A] | [0x61-0x7A] @@ -363,6 +371,7 @@ public final class Chars } } + /** * Test if the current character is an Alpha character : <alpha> ::= * [0x41-0x5A] | [0x61-0x7A] @@ -400,6 +409,7 @@ public final class Chars } } + /** * Test if the current character is a lowercased Alpha character :
* <alpha> ::= [0x61-0x7A] @@ -437,6 +447,7 @@ public final class Chars } } + /** * Test if the current character is a uppercased Alpha character :
* <alpha> ::= [0x61-0x7A] @@ -474,6 +485,7 @@ public final class Chars } } + /** * Check if the current character is an 7 bits ASCII CHAR (between 0 and * 127). @@ -511,6 +523,7 @@ public final class Chars } } + /** * Check if the current character is an 7 bits ASCII CHAR (between 0 and * 127). <char> ::= <alpha> | <digit> | '-' @@ -540,6 +553,7 @@ public final class Chars } } + /** * Check if the current character is an 7 bits ASCII CHAR (between 0 and * 127). <char> ::= <alpha> | <digit> | '-' @@ -569,6 +583,7 @@ public final class Chars } } + /** * Check if the current character is an 7 bits ASCII CHAR (between 0 and * 127). <char> ::= <alpha> | <digit> | '-' @@ -605,6 +620,7 @@ public final class Chars } } + /** * Test if the current character is a bit, ie 0 or 1. * @@ -629,11 +645,12 @@ public final class Chars } else { - char c = string.charAt( index ); + char c = string.charAt( index ); return ( ( c == '0' ) || ( c == '1' ) ); } } + /** * Test if the current character is a digit <digit> ::= '0' | '1' | '2' | * '3' | '4' | '5' | '6' | '7' | '8' | '9' @@ -653,6 +670,7 @@ public final class Chars } } + /** * Test if the current character is a digit <digit> ::= '0' | '1' | '2' | * '3' | '4' | '5' | '6' | '7' | '8' | '9' @@ -666,6 +684,7 @@ public final class Chars return ( car >= '0' ) && ( car <= '9' ); } + /** * Test if the current character is a digit <digit> ::= '0' | '1' | '2' | * '3' | '4' | '5' | '6' | '7' | '8' | '9' @@ -682,10 +701,11 @@ public final class Chars } else { - return ( ( ( ( bytes[index] | 0x7F ) != 0x7F ) || !DIGIT[bytes[index]] ) ? false : true ); + return ( ( ( ( bytes[index] | 0x7F ) != 0x7F ) || !DIGIT[bytes[index]] ) ? false : true ); } } + /** * Test if the current character is a digit <digit> ::= '0' | '1' | '2' | * '3' | '4' | '5' | '6' | '7' | '8' | '9' @@ -706,6 +726,7 @@ public final class Chars } } + /** * Test if the current character is a digit <digit> ::= '0' | '1' | '2' | * '3' | '4' | '5' | '6' | '7' | '8' | '9' @@ -729,11 +750,12 @@ public final class Chars } else { - char c = string.charAt( index ); + char c = string.charAt( index ); return ( ( ( c > 127 ) || !DIGIT[c] ) ? false : true ); } } + /** * Test if the current character is a digit <digit> ::= '0' | '1' | '2' | * '3' | '4' | '5' | '6' | '7' | '8' | '9' @@ -753,6 +775,7 @@ public final class Chars } } + /** * Check if the current byte is an Hex Char * <hex> ::= [0x30-0x39] | [0x41-0x46] | [0x61-0x66] @@ -765,6 +788,7 @@ public final class Chars return ( ( b | 0x7F ) == 0x7F ) || HEX[b]; } + /** * Check if the current character is an Hex Char <hex> ::= [0x30-0x39] | * [0x41-0x46] | [0x61-0x66] @@ -794,6 +818,7 @@ public final class Chars } } + /** * Check if the current character is an Hex Char <hex> ::= [0x30-0x39] | * [0x41-0x46] | [0x61-0x66] @@ -823,6 +848,7 @@ public final class Chars } } + /** * Check if the current character is an Hex Char <hex> ::= [0x30-0x39] | * [0x41-0x46] | [0x61-0x66] Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/DateUtils.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/DateUtils.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/DateUtils.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/DateUtils.java Tue Jan 24 17:44:03 2012 @@ -53,13 +53,13 @@ public final class DateUtils } - public static Date getDate( String zuluTime ) + public static Date getDate( String zuluTime ) { Calendar cal = Calendar.getInstance( UTC_TIME_ZONE ); - cal.set( Calendar.YEAR, getYear( zuluTime ) ); - cal.set( Calendar.MONTH, getMonth( zuluTime ) - 1 ); - cal.set( Calendar.DAY_OF_MONTH, getDay( zuluTime ) ); - cal.set( Calendar.HOUR_OF_DAY, getHour( zuluTime ) ); + cal.set( Calendar.YEAR, getYear( zuluTime ) ); + cal.set( Calendar.MONTH, getMonth( zuluTime ) - 1 ); + cal.set( Calendar.DAY_OF_MONTH, getDay( zuluTime ) ); + cal.set( Calendar.HOUR_OF_DAY, getHour( zuluTime ) ); cal.set( Calendar.MINUTE, getMinutes( zuluTime ) ); cal.set( Calendar.SECOND, getSeconds( zuluTime ) ); return cal.getTime(); @@ -70,38 +70,38 @@ public final class DateUtils { return Integer.parseInt( zuluTime.substring( 0, 4 ) ); } - - + + public static int getMonth( String zuluTime ) { return Integer.parseInt( zuluTime.substring( 4, 6 ) ); } - - + + public static int getDay( String zuluTime ) { return Integer.parseInt( zuluTime.substring( 6, 8 ) ); } - - + + public static int getHour( String zuluTime ) { return Integer.parseInt( zuluTime.substring( 8, 10 ) ); } - - + + public static int getMinutes( String zuluTime ) { return Integer.parseInt( zuluTime.substring( 10, 12 ) ); } - - + + public static int getSeconds( String zuluTime ) { return Integer.parseInt( zuluTime.substring( 12, 14 ) ); } - - + + /** * Gets the generalized time using the "Z" form of the g-time-zone described * by [ fraction of minute - double millisec = 1000 * clonedCalendar.get( Calendar.SECOND ) + clonedCalendar.get( Calendar.MILLISECOND ); + double millisec = 1000 * clonedCalendar.get( Calendar.SECOND ) + + clonedCalendar.get( Calendar.MILLISECOND ); double fraction = millisec / ( 1000 * 60 ); fractionDigits = new DecimalFormat( "0." + fractionFormat ); sb.append( fractionDelimiter == FractionDelimiter.COMMA ? ',' : '.' ); @@ -670,7 +671,8 @@ public class GeneralizedTime implements case YEAR_MONTH_DAY_HOUR_FRACTION: // min + sec + millis => fraction of minute - millisec = 1000 * 60 * clonedCalendar.get( Calendar.MINUTE ) + 1000 * clonedCalendar.get( Calendar.SECOND ) + millisec = 1000 * 60 * clonedCalendar.get( Calendar.MINUTE ) + 1000 + * clonedCalendar.get( Calendar.SECOND ) + clonedCalendar.get( Calendar.MILLISECOND ); fraction = millisec / ( 1000 * 60 * 60 ); fractionDigits = new DecimalFormat( "0." + fractionFormat ); Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Hex.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Hex.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Hex.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Hex.java Tue Jan 24 17:44:03 2012 @@ -38,17 +38,108 @@ public class Hex public static final byte[] HEX_VALUE = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 00 -> 0F - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 10 -> 1F - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 20 -> 2F - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 30 -> 3F ( 0, 1,2, 3, 4,5, 6, 7, 8, 9 ) - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 40 -> 4F ( A, B, C, D, E, F ) - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 50 -> 5F - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1 // 60 -> 6F ( a, b, c, d, e, f ) - }; + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, // 10 -> 1F + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, // 20 -> 2F + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + -1, + -1, + -1, + -1, + -1, + -1, // 30 -> 3F ( 0, 1,2, 3, 4,5, 6, 7, 8, 9 ) + -1, + 10, + 11, + 12, + 13, + 14, + 15, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, // 40 -> 4F ( A, B, C, D, E, F ) + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, // 50 -> 5F + -1, + 10, + 11, + 12, + 13, + 14, + 15, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 // 60 -> 6F ( a, b, c, d, e, f ) + }; /** Used to build output as Hex */ public static final char[] HEX_CHAR = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; + /** * Translate two chars to an hex value. The chars must be * in [a-fA-F0-9] @@ -64,9 +155,10 @@ public class Hex return -1; } - return (byte)( ( HEX_VALUE[high] << 4 ) | HEX_VALUE[low] ); + return ( byte ) ( ( HEX_VALUE[high] << 4 ) | HEX_VALUE[low] ); } + /** * Translate two bytes to an hex value. The bytes must be * in [0-9a-fA-F] @@ -82,9 +174,10 @@ public class Hex return -1; } - return (byte)( ( HEX_VALUE[high] << 4 ) | HEX_VALUE[low] ); + return ( byte ) ( ( HEX_VALUE[high] << 4 ) | HEX_VALUE[low] ); } + /** * Return an hex value from a sinle char * The char must be in [0-9a-fA-F] @@ -129,16 +222,16 @@ public class Hex // the bytes representing the encoded string of hex // this should be ( length - 1 )/2 in size - byte[] decoded = new byte[ ( chars.length - 1 ) >> 1 ]; + byte[] decoded = new byte[( chars.length - 1 ) >> 1]; - for ( int ii = 1, jj = 0 ; ii < chars.length; ii+=2, jj++ ) + for ( int ii = 1, jj = 0; ii < chars.length; ii += 2, jj++ ) { int ch = ( HEX_VALUE[chars[ii]] << 4 ) - + HEX_VALUE[chars[ii + 1]]; + + HEX_VALUE[chars[ii + 1]]; decoded[jj] = ( byte ) ch; } - return Strings.utf8ToString(decoded); + return Strings.utf8ToString( decoded ); } @@ -163,7 +256,7 @@ public class Hex } // create buffer and add everything before start of scan - byte[] buf = new byte[ str.length()/3]; + byte[] buf = new byte[str.length() / 3]; int pos = 0; // start scaning until we find an escaped series of bytes @@ -174,12 +267,12 @@ public class Hex if ( c == '\\' ) { // we have the start of a hex escape sequence - if ( Chars.isHex(str, i + 1) && Chars.isHex(str, i + 2) ) + if ( Chars.isHex( str, i + 1 ) && Chars.isHex( str, i + 2 ) ) { byte value = ( byte ) ( ( HEX_VALUE[str.charAt( i + 1 )] << 4 ) + HEX_VALUE[str.charAt( i + 2 )] ); - i+=2; + i += 2; buf[pos++] = value; } } @@ -192,6 +285,7 @@ public class Hex return buf; } + /** * Converts an array of bytes into an array of characters representing the * hexidecimal values of each byte in order. The returned array will be Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/IteratorNamingEnumeration.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/IteratorNamingEnumeration.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/IteratorNamingEnumeration.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/IteratorNamingEnumeration.java Tue Jan 24 17:44:03 2012 @@ -42,7 +42,7 @@ public class IteratorNamingEnumeration iterator) + public IteratorNamingEnumeration( Iterator iterator ) { this.iterator = iterator; } Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/JoinIterator.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/JoinIterator.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/JoinIterator.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/JoinIterator.java Tue Jan 24 17:44:03 2012 @@ -55,7 +55,7 @@ public class JoinIterator implements Ite throw new IllegalArgumentException( I18n.err( I18n.ERR_04397 ) ); } - this.iterators = new Iterator[ iterators.length ]; + this.iterators = new Iterator[iterators.length]; System.arraycopy( iterators, 0, this.iterators, 0, iterators.length ); this.index = 0; } Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/KeyValue.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/KeyValue.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/KeyValue.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/KeyValue.java Tue Jan 24 17:44:03 2012 @@ -16,6 +16,7 @@ */ package org.apache.directory.shared.util; + /** * Defines a simple key value pair. *

@@ -28,7 +29,8 @@ package org.apache.directory.shared.util * * @author Stephen Colebourne */ -public interface KeyValue { +public interface KeyValue +{ /** * Gets the key from the pair. @@ -37,6 +39,7 @@ public interface KeyValue { */ Object getKey(); + /** * Gets the value from the pair. * Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/MethodUtils.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/MethodUtils.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/MethodUtils.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/MethodUtils.java Tue Jan 24 17:44:03 2012 @@ -19,12 +19,14 @@ */ package org.apache.directory.shared.util; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.reflect.Method; import java.util.Arrays; + /** * @author Apache Directory Project */ @@ -56,9 +58,9 @@ public final class MethodUtils * @throws NoSuchMethodException when the method cannot be found */ public static Method getAssignmentCompatibleMethod( Class clazz, - String candidateMethodName, - Class[] candidateParameterTypes - ) throws NoSuchMethodException + String candidateMethodName, + Class[] candidateParameterTypes + ) throws NoSuchMethodException { if ( LOG.isDebugEnabled() ) { @@ -82,7 +84,7 @@ public final class MethodUtils { // Look for exactly the same signature. Method exactMethod = clazz.getMethod( candidateMethodName, candidateParameterTypes ); - + if ( exactMethod != null ) { return exactMethod; @@ -93,27 +95,26 @@ public final class MethodUtils LOG.info( "Could not find accessible exact match for candidateMethod {}", candidateMethodName, e ); } - /** * Look for the assignment-compatible signature. */ - + // Get all methods of the class. Method[] methods = clazz.getMethods(); - + // For each method of the class... for ( int mx = 0; mx < methods.length; mx++ ) { // If the method name does not match... - if ( !candidateMethodName.equals( methods[ mx ].getName() ) ) + if ( !candidateMethodName.equals( methods[mx].getName() ) ) { // ... Go on with the next method. continue; } - + // ... Get parameter types list. - Class[] parameterTypes = methods[ mx ].getParameterTypes(); - + Class[] parameterTypes = methods[mx].getParameterTypes(); + // If parameter types list length mismatch... if ( parameterTypes.length != candidateParameterTypes.length ) { @@ -125,17 +126,17 @@ public final class MethodUtils for ( int px = 0; px < parameterTypes.length; px++ ) { // ... If the parameter is not assignment-compatible with the candidate parameter type... - if ( ! parameterTypes[ px ].isAssignableFrom( candidateParameterTypes[ px ] ) ) + if ( !parameterTypes[px].isAssignableFrom( candidateParameterTypes[px] ) ) { // ... Go on with the next method. break; } } - + // Return the only one possible and found method. - return methods[ mx ]; + return methods[mx]; } - + throw new NoSuchMethodException( clazz.getName() + "." + candidateMethodName + "(" + Arrays.toString( candidateParameterTypes ) + ")" ); } Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/OsgiUtils.java Tue Jan 24 17:44:03 2012 @@ -19,6 +19,7 @@ */ package org.apache.directory.shared.util; + import java.io.File; import java.io.FileFilter; import java.io.IOException; @@ -42,8 +43,8 @@ public class OsgiUtils { /** A logger */ private static final Logger LOG = LoggerFactory.getLogger( OsgiUtils.class ); - - + + /** * All the packages that are exported from all bundles found on the system * classpath. The provided filter if not null is used to prune classpath @@ -57,27 +58,27 @@ public class OsgiUtils { pkgs = new HashSet(); } - + Set candidates = getClasspathCandidates( filter ); - + for ( File candidate : candidates ) { String exports = getBundleExports( candidate ); - + if ( exports == null ) { LOG.debug( "No export found for candidate: {}", candidate ); continue; } - + LOG.debug( "Processing exports for candidate: {}\n\n{}\n", candidate, exports ); splitIntoPackages( exports, pkgs ); } - + return pkgs; } - + /** * Splits an Package-Export OSGi Manifest Attribute value into packages * while stripping away the key/value properties. @@ -91,12 +92,12 @@ public class OsgiUtils { pkgs = new HashSet(); } - + int index = 0; boolean inPkg = true; boolean inProps = false; StringBuilder pkg = new StringBuilder(); - + while ( index < exports.length() ) { if ( inPkg && exports.charAt( index ) != ';' ) @@ -108,14 +109,14 @@ public class OsgiUtils { inPkg = false; inProps = true; - + pkgs.add( pkg.toString() ); LOG.debug( "Added package: {}", pkg.toString() ); pkg.setLength( 0 ); - + index += 8; } - else if ( inProps && exports.charAt( index ) == '"' + else if ( inProps && exports.charAt( index ) == '"' && index + 1 < exports.length() && exports.charAt( index + 1 ) == ',' ) { @@ -133,21 +134,21 @@ public class OsgiUtils throw new IllegalStateException( "Should never get here!" ); } } - + return pkgs; } - - + + public static Set getClasspathCandidates( FileFilter filter ) { Set candidates = new HashSet(); String separator = System.getProperty( "path.separator" ); String[] cpElements = System.getProperty( "java.class.path" ).split( separator ); - + for ( String element : cpElements ) { File candidate = new File( element ); - + if ( candidate.isFile() ) { if ( filter != null && filter.accept( candidate ) ) @@ -166,11 +167,11 @@ public class OsgiUtils } } } - + return candidates; } - + /** * Gets the attribute value for the Export-Bundle OSGi Manifest Attribute. * @@ -180,26 +181,26 @@ public class OsgiUtils * or null if the attribute does not exist. */ public static String getBundleExports( File bundle ) - { + { JarFile jar; try { jar = new JarFile( bundle ); Manifest manifest = jar.getManifest(); - + if ( manifest == null ) { return null; } - - for (Map.Entry attr : manifest.getMainAttributes().entrySet() ) + + for ( Map.Entry attr : manifest.getMainAttributes().entrySet() ) { if ( attr.getKey().toString().equals( "Export-Package" ) ) { return attr.getValue().toString(); } } - + return null; } catch ( IOException e ) Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Position.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Position.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Position.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/Position.java Tue Jan 24 17:44:03 2012 @@ -19,6 +19,7 @@ */ package org.apache.directory.shared.util; + /** * * This class is used to store the position of a token in a string. @@ -30,13 +31,14 @@ public class Position { /** The starting position in the string */ public int start = 0; - - /** The current token length */ + + /** The current token length */ public int length = 0; - - /** The token end position in the string */ + + /** The token end position in the string */ public int end = 0; - + + public String toString() { return "[" + start + ", " + end + ", " + length + "]"; Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/PreferencesDictionary.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/PreferencesDictionary.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/PreferencesDictionary.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/PreferencesDictionary.java Tue Jan 24 17:44:03 2012 @@ -33,7 +33,7 @@ import org.apache.directory.shared.i18n. * * @author Apache Directory Project */ -public class PreferencesDictionary extends Dictionary +public class PreferencesDictionary extends Dictionary { /** the underlying wrapped preferences object */ private final Preferences prefs; Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/SingletonEnumeration.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/SingletonEnumeration.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/SingletonEnumeration.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/SingletonEnumeration.java Tue Jan 24 17:44:03 2012 @@ -45,7 +45,7 @@ public class SingletonEnumeration imp * @param element * TODO */ - public SingletonEnumeration(final T element) + public SingletonEnumeration( final T element ) { this.element = element; } Modified: directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/StringConstants.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/StringConstants.java?rev=1235374&r1=1235373&r2=1235374&view=diff ============================================================================== --- directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/StringConstants.java (original) +++ directory/shared/trunk/util/src/main/java/org/apache/directory/shared/util/StringConstants.java Tue Jan 24 17:44:03 2012 @@ -41,6 +41,7 @@ public interface StringConstants /** * The empty String[] */ - String[] EMPTY_STRINGS = new String[] {}; + String[] EMPTY_STRINGS = new String[] + {}; int NOT_EQUAL = -1; }