HHH-12147 - Code improvement

This commit is contained in:
Andrea Boriero 2017-12-13 11:11:41 +00:00
parent 00a07caf5b
commit 37df2bac74
1 changed files with 12 additions and 4 deletions

View File

@ -3338,9 +3338,13 @@ public final class AnnotationBinder {
TableGenerators tableGenerators = annElt.getAnnotation( TableGenerators.class ); TableGenerators tableGenerators = annElt.getAnnotation( TableGenerators.class );
if ( tableGenerators != null ) { if ( tableGenerators != null ) {
for ( TableGenerator tableGenerator : tableGenerators.value() ) { for ( TableGenerator tableGenerator : tableGenerators.value() ) {
IdentifierGeneratorDefinition idGenerator = buildIdGenerator(
tableGenerator,
context
);
generators.put( generators.put(
buildIdGenerator( tableGenerator, context ).getName(), idGenerator.getName(),
buildIdGenerator( tableGenerator, context ) idGenerator
); );
} }
} }
@ -3348,9 +3352,13 @@ public final class AnnotationBinder {
SequenceGenerators sequenceGenerators = annElt.getAnnotation( SequenceGenerators.class ); SequenceGenerators sequenceGenerators = annElt.getAnnotation( SequenceGenerators.class );
if ( sequenceGenerators != null ) { if ( sequenceGenerators != null ) {
for ( SequenceGenerator sequenceGenerator : sequenceGenerators.value() ) { for ( SequenceGenerator sequenceGenerator : sequenceGenerators.value() ) {
IdentifierGeneratorDefinition idGenerator = buildIdGenerator(
sequenceGenerator,
context
);
generators.put( generators.put(
buildIdGenerator( sequenceGenerator, context ).getName(), idGenerator.getName(),
buildIdGenerator( sequenceGenerator, context ) idGenerator
); );
} }
} }