Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2015-08-01 11:05:50 +0000
committerFrank Becker2015-11-26 17:40:04 +0000
commitb9b67b4a85c973105e45521c4aa66b51754a0e26 (patch)
tree0bf312eb2ff24b13a77b153c2bf74be9483d0015 /connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java
parentd384ba5675c9353af165a3145aae3d011032e546 (diff)
downloadorg.eclipse.mylyn.tasks-b9b67b4a85c973105e45521c4aa66b51754a0e26.tar.gz
org.eclipse.mylyn.tasks-b9b67b4a85c973105e45521c4aa66b51754a0e26.tar.xz
org.eclipse.mylyn.tasks-b9b67b4a85c973105e45521c4aa66b51754a0e26.zip
414360: remove some Java Problems and Java Tasks
Change-Id: Ic85866ddc8917240acbeda3830a871a0177038b6 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=414360
Diffstat (limited to 'connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java')
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java
index 87939a321..ef42c1666 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestAuthenticatedGetRequest.java
@@ -36,10 +36,10 @@ public class BugzillaRestAuthenticatedGetRequest<T> extends BugzillaRestRequest<
private final String urlSuffix;
- private final TypeToken responseType;
+ private final TypeToken<?> responseType;
public BugzillaRestAuthenticatedGetRequest(BugzillaRestHttpClient client, String urlSuffix,
- TypeToken responseType) {
+ TypeToken<?> responseType) {
super(client);
this.urlSuffix = urlSuffix;
this.responseType = responseType;
@@ -49,9 +49,9 @@ public class BugzillaRestAuthenticatedGetRequest<T> extends BugzillaRestRequest<
protected void authenticate(IOperationMonitor monitor) throws IOException {
UserCredentials credentials = getClient().getLocation().getCredentials(AuthenticationType.REPOSITORY);
if (credentials == null) {
- throw new IllegalStateException("Authentication requested without valid credentials");
+ throw new IllegalStateException("Authentication requested without valid credentials"); //$NON-NLS-1$
}
- HttpRequestBase request = new HttpGet(baseUrl() + MessageFormat.format("/login?login={0}&password={1}",
+ HttpRequestBase request = new HttpGet(baseUrl() + MessageFormat.format("/login?login={0}&password={1}", //$NON-NLS-1$
new Object[] { credentials.getUserName(), credentials.getPassword() }));
request.setHeader(CONTENT_TYPE, TEXT_XML_CHARSET_UTF_8);
request.setHeader(ACCEPT, APPLICATION_JSON);
@@ -59,7 +59,7 @@ public class BugzillaRestAuthenticatedGetRequest<T> extends BugzillaRestRequest<
try {
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
getClient().setAuthenticated(false);
- throw new AuthenticationException("Authentication failed",
+ throw new AuthenticationException("Authentication failed", //$NON-NLS-1$
new AuthenticationRequest<AuthenticationType<UserCredentials>>(getClient().getLocation(),
AuthenticationType.REPOSITORY));
} else {
@@ -82,10 +82,10 @@ public class BugzillaRestAuthenticatedGetRequest<T> extends BugzillaRestRequest<
LoginToken token = ((BugzillaRestHttpClient) getClient()).getLoginToken();
if ((!(this instanceof BugzillaRestValidateRequest) && !(this instanceof BugzillaRestUnauthenticatedGetRequest))
&& token != null && bugUrl.length() > 0) {
- if (!bugUrl.endsWith("?")) {
- bugUrl += "&";
+ if (!bugUrl.endsWith("?")) { //$NON-NLS-1$
+ bugUrl += "&"; //$NON-NLS-1$
}
- bugUrl += "token=" + token.getToken();
+ bugUrl += "token=" + token.getToken(); //$NON-NLS-1$
}
HttpRequestBase request = new HttpGet(baseUrl() + bugUrl);
request.setHeader(CONTENT_TYPE, TEXT_XML_CHARSET_UTF_8);

Back to the top