HHH-6615 Minor format changes

This commit is contained in:
Chris Cranford 2019-12-19 09:59:38 -05:00 committed by Andrea Boriero
parent ea170f4dca
commit c02a703b17
2 changed files with 7 additions and 9 deletions

View File

@ -65,11 +65,9 @@ public class DefaultRevisionInfoGenerator implements RevisionInfoGenerator {
@Override
public void saveRevisionData(Session session, Object revisionData) {
session.save( revisionInfoEntityName, revisionData );
if ( revisionInfoNumberReader != null ) {
if ( revisionInfoNumberReader.getRevisionNumber( revisionData ).longValue() < 0 ) {
if ( revisionInfoNumberReader != null && revisionInfoNumberReader.getRevisionNumber( revisionData ).longValue() < 0 ) {
throw new AuditException( "Negative revision numbers are not allowed" );
}
}
sessionCacheCleaner.scheduleAuditDataRemoval( session, revisionData );
}

View File

@ -90,7 +90,7 @@ public class RevisionNumberOverflowTest extends BaseEnversJPAFunctionalTestCase
root = root.getCause();
}
assertTyping( type, root );
assertEquals( root.getMessage(), message );
assertEquals( message, root.getMessage() );
}
// We create a custom revision entity here with an explicit configuration for the revision