New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIXED JENKINS-48561] Give precedence to proxy exclusion list system property over env var #243
[FIXED JENKINS-48561] Give precedence to proxy exclusion list system property over env var #243
Conversation
…property over env var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far. Could you please fix the locale thing?
StringTokenizer stringTokenizer = new StringTokenizer(nonProxyHosts, "|", false); | ||
try { | ||
while(stringTokenizer.hasMoreTokens()) { | ||
exclusionsPool.add(stringTokenizer.nextToken().toLowerCase(), Boolean.TRUE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toLowerCase()
is invoked without locale, it will cause FindBugs failures with #242 I'd guess
exclusionsPool.add(stringTokenizer.nextToken().toLowerCase(), Boolean.TRUE); | ||
} | ||
} catch(sun.misc.REException e) { | ||
System.err.println("Malformed exception list in http.nonProxyHosts system property: " + e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will need to rework everything to loggers
} catch(sun.misc.REException e) { | ||
System.err.println("Malformed exception list in http.nonProxyHosts system property: " + e.getMessage()); | ||
} | ||
if(exclusionsPool.match(host.toLowerCase()) != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locale
Thanks for reviewing it. I pushed another two commits to take in account your comments. On a side note, I noticed that some portions of code have been partially copy/pasted from
Maybe it is a way to keep compatibility with older releases while transitioning from hudson namespace to org.jenkinsci? IDK. |
Noticed in mvn logs a warning regarding usage of Sun proprietary API ( |
In this case it would be possible to have an utility class somewhere and to invoke its methods from other places. No need to invoke special magic, just keeping and probably deprecating the current methods, but moving the duplicated logic to another method
Would be great. I was also wondering about these packages, but I didn't check whether they are deprecated |
@etiennebec Are you still planning to change the classes? |
@oleg-nenashev yes, probably by the end of next week. |
Jenkins project does not support Java 9 so far. Is it possible to have a Java8-compatible implementation without deprecated classes? |
OpenJDK9 removed references to old internal Sun lib, including the ones used in
So I re-used the same logic which results in a highly similar code. I have two concerns:
I will probably refactor and simplify a bit other proxy related methods, including the duplicate of |
Didn't expect you to review my new commits so quickly. 👍
The code is actually Java8-compatible (I don't even have the JDK9 installed on my computer). When I say in the comment that the implementation supports only Java9, I'm referring to the previous As mentioned in my previous message Java9 restored the expected and correct behavior. |
Sorry, slipped down in my priority list |
I will try to play with that in order to deliver it in Remoting 3.18 (which will be likely an LTS candidate). Sorry for the review delay, JEP-200 consumed much my capacity |
Thanks for all your effort on JEP-200. 👍 Don't worry, we're compiling our own version of jenkins/remoting/plugins in my company, so it's not an issue if it takes some time for this PR to be mainlined. Just trying to give back to the community! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CC @rysteboe . I think we can land it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh, sorry, this slipped off my radar. Agreed, LGTM.
https://issues.jenkins-ci.org/browse/JENKINS-48561