Instead of this:
for ( GenerationTarget target : targets ) { try { target.accept( formatter.format( sqlString ) ); } catch (CommandAcceptanceException e) { if ( !quiet ) { options.getExceptionHandler().handleException( e ); } // otherwise ignore the exception } }
we could do this:
for ( GenerationTarget target : targets ) { String formattedSql = formatter.format( sqlString ); try { target.accept( formattedSql ); } catch (CommandAcceptanceException e) { if ( !quiet ) { options.getExceptionHandler().handleException( e ); } // otherwise ignore the exception } }
This is valid for multiple classes in the org.hibernate.tool.schema.internal package.