HHH-4843 guard against null properties

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18631 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Emmanuel Bernard 2010-01-26 17:11:04 +00:00
parent 82c5616343
commit 8386be117a
1 changed files with 6 additions and 4 deletions

View File

@ -90,10 +90,12 @@ public final class LogHelper {
sb.append( "]\n\t" );
sb.append( "Properties [" );
Properties properties = unitInfo.getProperties();
Enumeration names = properties.propertyNames();
while ( names.hasMoreElements() ) {
String name = (String) names.nextElement();
sb.append( "\n\t\t" ).append( name ).append( ": " ).append( properties.getProperty( name ) );
if (properties != null) {
Enumeration names = properties.propertyNames();
while ( names.hasMoreElements() ) {
String name = (String) names.nextElement();
sb.append( "\n\t\t" ).append( name ).append( ": " ).append( properties.getProperty( name ) );
}
}
sb.append( "]" );
return sb.toString();