-
Notifications
You must be signed in to change notification settings - Fork 394
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
Separate cache for each server config #93
Conversation
@@ -180,8 +180,8 @@ | |||
<plugin> | |||
<artifactId>maven-compiler-plugin</artifactId> | |||
<configuration> | |||
<source>1.6</source> | |||
<target>1.6</target> | |||
<source>1.7</source> |
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.
TODO don't forget mark in changelog 1.7 requirement
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
9266983
to
f153264
Compare
This change requires java 1.7 to use java.nio as more effective way to operate files. This implementation creates directory with name as hash of each pair <api url+creds>. Redundant dirs removed on each save of global config.
private OkHttpConnector connector(String apiUrl) { | ||
OkHttpClient client = new OkHttpClient().setProxy(getProxy(apiUrl)); | ||
private OkHttpConnector connector(GitHubServerConfig config) { | ||
OkHttpClient client = new OkHttpClient().setProxy(getProxy(defaultIfBlank(config.getApiUrl(), GITHUB_URL))); |
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.
wouldn't this mask issue when something is broken and url get blank?
i.e. user entered url, jelly magic failed, connection created with public connection and user didn't get thrown error
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.
Insurance just in case. This should never happen until somebody will call directly classes from internals
👍 LGTM besides using defaults when real url is expected. |
Separate cache for each server config
This change requires java 1.7 to use java.nio as more effective way to operate files.
This implementation creates directory with name as hash of each pair
<api url+creds>
.Redundant dirs removed on each save of global config.