final IdentifierGeneratorDefinition old = idGeneratorDefinitionMap.put( generator.getName(), generator );
if ( old != null ) {
if ( !old.equals( generator ) ) {
thrownew IllegalArgumentException( "Duplicate generator name " + old.getName() );
}
}
the exception is thrown when there is a previous IdentifierGeneratorDefinition with the same name (old !=null ) but it is not equals to the new one, !old.equals( generator ).