From: <hib...@li...> - 2006-03-29 13:57:30
|
Author: ste...@jb... Date: 2006-03-29 08:57:11 -0500 (Wed, 29 Mar 2006) New Revision: 9713 Modified: branches/Branch_3_1/Hibernate3/src/org/hibernate/util/PropertiesHelper.java Log: HHH-1560 : account for non-string system properties Modified: branches/Branch_3_1/Hibernate3/src/org/hibernate/util/PropertiesHelper.java =================================================================== --- branches/Branch_3_1/Hibernate3/src/org/hibernate/util/PropertiesHelper.java 2006-03-29 13:56:59 UTC (rev 9712) +++ branches/Branch_3_1/Hibernate3/src/org/hibernate/util/PropertiesHelper.java 2006-03-29 13:57:11 UTC (rev 9713) @@ -11,7 +11,6 @@ public final class PropertiesHelper { private static final String PLACEHOLDER_START = "${"; - private static final String PLACEHOLDER_END = "}"; public static boolean getBoolean(String property, Properties properties) { String setting = properties.getProperty(property); @@ -85,9 +84,9 @@ Iterator itr = properties.entrySet().iterator(); while ( itr.hasNext() ) { final Map.Entry entry = ( Map.Entry ) itr.next(); - final String value = ( String ) entry.getValue(); - if ( value != null ) { - final String resolved = resolvePlaceHolder( value ); + final Object value = entry.getValue(); + if ( value != null && String.class.isInstance( value ) ) { + final String resolved = resolvePlaceHolder( ( String ) value ); if ( !value.equals( resolved ) ) { if ( resolved == null ) { itr.remove(); |