[jbosstools-issues] [JBoss JIRA] (JBIDE-15485) openshift-java-client: remove proxy settings from APIResource

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Thu Sep 12 05:56:03 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-15485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803779#comment-12803779 ] 

Andre Dietisheim edited comment on JBIDE-15485 at 9/12/13 5:54 AM:
-------------------------------------------------------------------

The OpenShift jenkins plugin is actually using this functionality. We should migrate the jenkins plugin to set the system properties on its own:

https://github.com/openshift/jenkins-cloud-plugin/blob/master/src/main/java/hudson/plugins/openshift/OpenShiftCloud.java#L177

{code}
service = new OpenShiftConnectionFactory().getConnection(
		username, username, password, authKey, authIV, url);

service.setEnableSSLCertChecks(!ignoreBrokerCertCheck);
if (proxyHost != null && proxyHost.length() > 0) {
	service.setProxySet(true);
	service.setProxyHost(proxyHost.trim());
	service.setProxyPort(Integer.toString(proxyPort));
}
{code}
                
      was (Author: adietish):
    The OpenShift jenkins plugin is actually using this functionality. We should migrate the jenkins plugin to set the system properties on its own:

https://github.com/openshift/jenkins-cloud-plugin/blob/master/src/main/java/hudson/plugins/openshift/OpenShiftCloud.java#L177

{code}
service = new OpenShiftConnectionFactory().getConnection(
						username, username, password, authKey, authIV, url);

				service.setEnableSSLCertChecks(!ignoreBrokerCertCheck);

				if (proxyHost != null && proxyHost.length() > 0) {
					service.setProxySet(true);
					service.setProxyHost(proxyHost.trim());
					service.setProxyPort(Integer.toString(proxyPort));
				}
{code}
                  
> openshift-java-client: remove proxy settings from APIResource
> -------------------------------------------------------------
>
>                 Key: JBIDE-15485
>                 URL: https://issues.jboss.org/browse/JBIDE-15485
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.1.0.Final
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>             Fix For: 4.2.0.Alpha1
>
>
> The class APIResource offers some accessors that allow users to set the proxy system properties. This is a leftover when the old client code was migrated to the new RESTful service. This is IMHO a bad practice that should get removed since this affects all java code that's using HttpURLConnection and that's running on the same JVM (it sets the system properties for the jvm behind the scenes).

--
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: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list