]
Andre Dietisheim updated JBIDE-16112:
-------------------------------------
Labels: openshift-java-client (was: )
openshift-java-client: remove hard coded default timeout, dont set
HttpUrlConnection timeout
--------------------------------------------------------------------------------------------
Key: JBIDE-16112
URL:
https://issues.jboss.org/browse/JBIDE-16112
Project: Tools (JBoss Tools)
Issue Type: Enhancement
Components: openshift
Affects Versions: 4.1.1.CR1
Reporter: Andre Dietisheim
Labels: openshift-java-client
Fix For: 4.2.x
The current code to set timeouts in openshift-java-client is:
{code}
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;
}
{code}
calling it looks like this:
{code}
private void setReadTimeout(int timeout, URLConnection connection) {
connection.setReadTimeout(
getTimeout(
timeout,
getSystemPropertyInteger(SYSPROP_OPENSHIFT_READ_TIMEOUT),
getSystemPropertyInteger(SYSPROP_DEFAULT_READ_TIMEOUT),
DEFAULT_READ_TIMEOUT));
}
{code}
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: