Skip to content

Commit

Permalink
Partial fix for DIRSERVER-1728: apacheds-core-annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
elecharny committed Aug 15, 2024
1 parent a4da7a9 commit 47ae9be
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public static DirectoryService getDirectoryService() throws Exception
return createDS( dsBuilder );
}

throw new LdapException( I18n.err( I18n.ERR_114 ) );
throw new LdapException( I18n.err( I18n.ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE ) );
}


Expand All @@ -384,7 +384,7 @@ else if ( entry.isChangeModify() )
}
else
{
String message = I18n.err( I18n.ERR_117, entry.getChangeType() );
String message = I18n.err( I18n.ERR_01002_UNSUPPORTED_CHANGE_TYPE, entry.getChangeType() );
throw new LdapException( message );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ private void initSchema() throws Exception

if ( !errors.isEmpty() )
{
throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors( errors ) ) );
throw new Exception( I18n.err( I18n.ERR_01000_SCHEMA_LOAD_FAILED, Exceptions.printErrors( errors ) ) );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ else if ( entry.isChangeModify() )
}
else
{
String message = I18n.err( I18n.ERR_117, entry.getChangeType() );
String message = I18n.err( I18n.ERR_01002_UNSUPPORTED_CHANGE_TYPE, entry.getChangeType() );
LOG.error( message );
throw new NamingException( message );
}
Expand Down
6 changes: 3 additions & 3 deletions i18n/src/main/java/org/apache/directory/server/i18n/I18n.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public enum I18n
ERR_00023_NEGATIVE_REVISION("ERR_00023_NEGATIVE_REVISION"),

// apacheds-core-annotation errors 1000 - 1999
ERR_01000_SCHEMA_LOAD_FAILED("ERR_01000_SCHEMA_LOAD_FAILED"),
ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE("ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE"),
ERR_01002_UNSUPPORTED_CHANGE_TYPE("ERR_01002_UNSUPPORTED_CHANGE_TYPE"),

// apacheds-core-api errors 2000 - 2999

Expand Down Expand Up @@ -236,10 +239,8 @@ public enum I18n
// ERR_110( "ERR_110" ),
// ERR_111( "ERR_111" ),
ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY("ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY"),
ERR_114("ERR_114"),
ERR_115("ERR_115"),
ERR_116("ERR_116"),
ERR_117("ERR_117"),
ERR_118("ERR_118"),
ERR_119("ERR_119"),
ERR_120("ERR_120"),
Expand Down Expand Up @@ -425,7 +426,6 @@ public enum I18n
ERR_309("ERR_309"),

ERR_313("ERR_313"),
ERR_317("ERR_317"),
// ERR_318( "ERR_318" ),
ERR_319("ERR_319"),
ERR_320("ERR_320"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ ERR_00021_CANNOT_BUILD_ENTRY=Cannot build an entry for ''{0}'' and this DN :''{1
ERR_00022_BAD_REPLICA_ID=The replicaId must be in [0, 999]
ERR_00023_NEGATIVE_REVISION=revision must be greater than or equal to 0



# apacheds-core-annotation errors 1000 - 1999
ERR_01000_SCHEMA_LOAD_FAILED=Schema load failed : {0}
ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE=Unable to create a DirectoryService instance for unknow reason
ERR_01002_UNSUPPORTED_CHANGE_TYPE=Unsupported changetype found in LDIF: {0}


# apacheds-core-api errors 2000 - 2999

Expand Down Expand Up @@ -226,10 +228,8 @@ ERR_91=Attempt to destroy wrapped partition failed.
# ERR_110=
# ERR_111=
ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY=Could not delete file or directory {0}
ERR_114=Unable to create a DirectoryService instance for unknow reason
ERR_115=Failed to delete the working directory.
ERR_116=Failed to delete\:
ERR_117=Unsupported changetype found in LDIF: {0}
ERR_118=Error encountered while delivering notifications.
ERR_119=Encountered exception during event handling.
ERR_120=Failed to configure the jetty http server
Expand Down Expand Up @@ -414,7 +414,6 @@ ERR_307=Failed while parsing subtreeSpecification for {0}
ERR_308=Will not allow rename operation on entries with administrative descendants.
ERR_309=Bad value for the OID {0}
ERR_313=Invalid operation on Name {0}
ERR_317=Schema load failed : {0}
# ERR_318=
ERR_319=Cannot execute indirect lookup if it is not the next operation.
ERR_320=The throwReferral method is not implemented for a Bind operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ private void initSchema() throws Exception

if ( !errors.isEmpty() )
{
throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors( errors ) ) );
throw new Exception( I18n.err( I18n.ERR_01000_SCHEMA_LOAD_FAILED, Exceptions.printErrors( errors ) ) );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ private void initSchemaManager( InstanceLayout instanceLayout ) throws Exception

if ( !errors.isEmpty() )
{
throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors( errors ) ) );
throw new Exception( I18n.err( I18n.ERR_01000_SCHEMA_LOAD_FAILED, Exceptions.printErrors( errors ) ) );
}
}

Expand Down

0 comments on commit 47ae9be

Please sign in to comment.