summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/ReferenceFactory.java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2014-08-19 13:10:29 -0230
committerDwayne Boone <dwayne@zeroc.com>2014-08-19 13:10:29 -0230
commitc6d20e1e1afc75f8bd889c093ccbffb247ec30cb (patch)
tree19443a7e7263ce1d715dad261b4574942c419552 /java/src/IceInternal/ReferenceFactory.java
parentFixed (ICE-5592) - Add IceSSL.FindCert for OS X and Windows (diff)
downloadice-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.java34
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);