diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-08-19 13:10:29 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-08-19 13:10:29 -0230 |
commit | c6d20e1e1afc75f8bd889c093ccbffb247ec30cb (patch) | |
tree | 19443a7e7263ce1d715dad261b4574942c419552 /java/src/IceInternal/ReferenceFactory.java | |
parent | Fixed (ICE-5592) - Add IceSSL.FindCert for OS X and Windows (diff) | |
download | ice-c6d20e1e1afc75f8bd889c093ccbffb247ec30cb.tar.bz2 ice-c6d20e1e1afc75f8bd889c093ccbffb247ec30cb.tar.xz ice-c6d20e1e1afc75f8bd889c093ccbffb247ec30cb.zip |
ICE-3492 handle improper settings for timeout values
Diffstat (limited to 'java/src/IceInternal/ReferenceFactory.java')
-rw-r--r-- | java/src/IceInternal/ReferenceFactory.java | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/java/src/IceInternal/ReferenceFactory.java b/java/src/IceInternal/ReferenceFactory.java index c6914703f80..53d6e4c7873 100644 --- a/java/src/IceInternal/ReferenceFactory.java +++ b/java/src/IceInternal/ReferenceFactory.java @@ -838,10 +838,40 @@ public final class ReferenceFactory } property = propertyPrefix + ".LocatorCacheTimeout"; - locatorCacheTimeout = properties.getPropertyAsIntWithDefault(property, locatorCacheTimeout); + String value = properties.getProperty(property); + if(!value.isEmpty()) + { + locatorCacheTimeout = properties.getPropertyAsIntWithDefault(property, locatorCacheTimeout); + if(locatorCacheTimeout < -1) + { + locatorCacheTimeout = -1; + + StringBuffer msg = new StringBuffer("invalid value for "); + msg.append(property); + msg.append(" '"); + msg.append(properties.getProperty(property)); + msg.append("': defaulting to -1"); + _instance.initializationData().logger.warning(msg.toString()); + } + } property = propertyPrefix + ".InvocationTimeout"; - invocationTimeout = properties.getPropertyAsIntWithDefault(property, invocationTimeout); + value = properties.getProperty(property); + if(!value.isEmpty()) + { + invocationTimeout = properties.getPropertyAsIntWithDefault(property, locatorCacheTimeout); + if(invocationTimeout < 1 && invocationTimeout != -1) + { + invocationTimeout = -1; + + StringBuffer msg = new StringBuffer("invalid value for "); + msg.append(property); + msg.append(" '"); + msg.append(properties.getProperty(property)); + msg.append("': defaulting to -1"); + _instance.initializationData().logger.warning(msg.toString()); + } + } property = propertyPrefix + ".Context."; java.util.Map<String, String> contexts = properties.getPropertiesForPrefix(property); |