From: <hib...@li...> - 2006-07-11 17:18:48
|
Author: max...@jb... Date: 2006-07-11 13:18:43 -0400 (Tue, 11 Jul 2006) New Revision: 10104 Modified: trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java Log: fixed NPE in case of schemaexport and export=false Modified: trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java =================================================================== --- trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java 2006-07-10 18:46:58 UTC (rev 10103) +++ trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java 2006-07-11 17:18:43 UTC (rev 10104) @@ -306,12 +306,13 @@ } if ( export ) { statement.executeUpdate( sql ); + SQLWarning warnings = statement.getWarnings(); + if ( warnings != null) { + JDBCExceptionReporter.logWarnings( warnings ); + } } - SQLWarning warnings = statement.getWarnings(); - if ( warnings != null) { - JDBCExceptionReporter.logWarnings( warnings ); - } + } public static void main(String[] args) { |