-
Enhancement
-
Resolution: Done
-
Major
-
2.5.0
-
None
The current code to set timeouts in openshift-java-client is:
private int getTimeout(int timeout, int openShiftTimeout, int systemPropertyTimeout, int defaultTimeout) { if (timeout == NO_TIMEOUT) { timeout = openShiftTimeout; if (timeout == NO_TIMEOUT) { timeout = systemPropertyTimeout; if (timeout == NO_TIMEOUT) { timeout = defaultTimeout; } } } return timeout; }
calling it looks like this:
private void setReadTimeout(int timeout, URLConnection connection) { connection.setReadTimeout( getTimeout( timeout, getSystemPropertyInteger(SYSPROP_OPENSHIFT_READ_TIMEOUT), getSystemPropertyInteger(SYSPROP_DEFAULT_READ_TIMEOUT), DEFAULT_READ_TIMEOUT)); }
DEFAULT_READ_TIMEOUT should get eliminated, we should use the SYSPROP_OPENSHIFT_READ_TIMEOUT as this. Furthermore there's no need to set the SYSPROP_DEFAULT_READ_TIMEOUT.
- blocks
-
JBIDE-16108 Preferences: Timeout preferences should not set system properties but operation specific timeout
- Closed
- relates to
-
OSJC-71 openshift-java-client: correct IHttpClient.NO_TIMEOUT = 0 by = -1
- Closed