diff options
Diffstat (limited to 'java/src/IceInternal/DefaultsAndOverrides.java')
-rw-r--r-- | java/src/IceInternal/DefaultsAndOverrides.java | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/java/src/IceInternal/DefaultsAndOverrides.java b/java/src/IceInternal/DefaultsAndOverrides.java index 5b4a6ad1cfe..ad0db01c2ca 100644 --- a/java/src/IceInternal/DefaultsAndOverrides.java +++ b/java/src/IceInternal/DefaultsAndOverrides.java @@ -13,76 +13,76 @@ public final class DefaultsAndOverrides { DefaultsAndOverrides(Ice.Properties properties) { - String value; - - defaultProtocol = properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); + String value; + + defaultProtocol = properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); - value = properties.getProperty("Ice.Default.Host"); - if(value.length() != 0) - { - defaultHost = value; - } - else - { - defaultHost = null; - } - - value = properties.getProperty("Ice.Override.Timeout"); - if(value.length() > 0) - { - overrideTimeout = true; - overrideTimeoutValue = properties.getPropertyAsInt("Ice.Override.Timeout"); - } - else - { - overrideTimeout = false; - overrideTimeoutValue = -1; - } + value = properties.getProperty("Ice.Default.Host"); + if(value.length() != 0) + { + defaultHost = value; + } + else + { + defaultHost = null; + } + + value = properties.getProperty("Ice.Override.Timeout"); + if(value.length() > 0) + { + overrideTimeout = true; + overrideTimeoutValue = properties.getPropertyAsInt("Ice.Override.Timeout"); + } + else + { + overrideTimeout = false; + overrideTimeoutValue = -1; + } - value = properties.getProperty("Ice.Override.ConnectTimeout"); - if(value.length() > 0) - { - overrideConnectTimeout = true; - overrideConnectTimeoutValue = properties.getPropertyAsInt("Ice.Override.ConnectTimeout"); - } - else - { - overrideConnectTimeout = false; - overrideConnectTimeoutValue = -1; - } + value = properties.getProperty("Ice.Override.ConnectTimeout"); + if(value.length() > 0) + { + overrideConnectTimeout = true; + overrideConnectTimeoutValue = properties.getPropertyAsInt("Ice.Override.ConnectTimeout"); + } + else + { + overrideConnectTimeout = false; + overrideConnectTimeoutValue = -1; + } - value = properties.getProperty("Ice.Override.Compress"); - if(value.length() > 0) - { - overrideCompress = true; - boolean b = properties.getPropertyAsInt("Ice.Override.Compress") > 0; - if(!BasicStream.compressible() && b) - { - System.err.println("warning: bzip2 support not available, Ice.Override.Compress ignored"); - b = false; - } - overrideCompressValue = b; - } - else - { - overrideCompress = !BasicStream.compressible(); - overrideCompressValue = false; - } + value = properties.getProperty("Ice.Override.Compress"); + if(value.length() > 0) + { + overrideCompress = true; + boolean b = properties.getPropertyAsInt("Ice.Override.Compress") > 0; + if(!BasicStream.compressible() && b) + { + System.err.println("warning: bzip2 support not available, Ice.Override.Compress ignored"); + b = false; + } + overrideCompressValue = b; + } + else + { + overrideCompress = !BasicStream.compressible(); + overrideCompressValue = false; + } - value = properties.getProperty("Ice.Override.Secure"); - if(value.length() > 0) - { - overrideSecure = true; - overrideSecureValue = properties.getPropertyAsInt("Ice.Override.Secure") > 0; - } - else - { - overrideSecure = false; - overrideSecureValue = false; - } + value = properties.getProperty("Ice.Override.Secure"); + if(value.length() > 0) + { + overrideSecure = true; + overrideSecureValue = properties.getPropertyAsInt("Ice.Override.Secure") > 0; + } + else + { + overrideSecure = false; + overrideSecureValue = false; + } - defaultCollocationOptimization = - properties.getPropertyAsIntWithDefault("Ice.Default.CollocationOptimization", 1) > 0; + defaultCollocationOptimization = + properties.getPropertyAsIntWithDefault("Ice.Default.CollocationOptimization", 1) > 0; value = properties.getPropertyWithDefault("Ice.Default.EndpointSelection", "Random"); if(value.equals("Random")) @@ -100,9 +100,9 @@ public final class DefaultsAndOverrides throw ex; } - defaultLocatorCacheTimeout = properties.getPropertyAsIntWithDefault("Ice.Default.LocatorCacheTimeout", -1); + defaultLocatorCacheTimeout = properties.getPropertyAsIntWithDefault("Ice.Default.LocatorCacheTimeout", -1); - defaultPreferSecure = properties.getPropertyAsIntWithDefault("Ice.Default.PreferSecure", 0) > 0; + defaultPreferSecure = properties.getPropertyAsIntWithDefault("Ice.Default.PreferSecure", 0) > 0; } final public String defaultHost; |