|
From: <hib...@li...> - 2006-03-29 13:57:17
|
Author: ste...@jb...
Date: 2006-03-29 08:56:59 -0500 (Wed, 29 Mar 2006)
New Revision: 9712
Modified:
trunk/Hibernate3/src/org/hibernate/util/PropertiesHelper.java
Log:
HHH-1560 : account for non-string system properties
Modified: trunk/Hibernate3/src/org/hibernate/util/PropertiesHelper.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/util/PropertiesHelper.java 2006-03-29 12:58:12 UTC (rev 9711)
+++ trunk/Hibernate3/src/org/hibernate/util/PropertiesHelper.java 2006-03-29 13:56:59 UTC (rev 9712)
@@ -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();
|