1
0
Fork 0

Merge pull request #72 from hibi/master

Fixed incorrectly parsed dates
master
Bob Carroll 2015-03-24 21:34:43 -07:00
commit 1427e654bd
5 changed files with 4 additions and 10 deletions

View File

@ -19,7 +19,6 @@
package net.rcarz.jiraclient;
import org.apache.http.Header;
import org.apache.http.HttpRequest;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.UsernamePasswordCredentials;
@ -51,7 +50,7 @@ public class BasicCredentials implements ICredentials {
*/
public void authenticate(HttpRequest req) {
Credentials creds = new UsernamePasswordCredentials(username, password);
req.addHeader(new BasicScheme().authenticate(creds, "utf-8", false));
req.addHeader(BasicScheme.authenticate(creds, "utf-8", false));
}
/**
@ -63,11 +62,9 @@ public class BasicCredentials implements ICredentials {
return username;
}
@Override
public void initialize(RestClient client) throws JiraException {
}
@Override
public void logout(RestClient client) throws JiraException {
}

View File

@ -19,7 +19,6 @@
package net.rcarz.jiraclient;
import java.util.Date;
import java.util.List;
import java.util.Map;

View File

@ -56,8 +56,8 @@ public class Comment extends Resource {
id = Field.getString(map.get("id"));
author = Field.getResource(User.class, map.get("author"), restclient);
body = Field.getString(map.get("body"));
created = Field.getDate(map.get("created"));
updated = Field.getDate(map.get("updated"));
created = Field.getDateTime(map.get("created"));
updated = Field.getDateTime(map.get("updated"));
updatedAuthor = Field.getResource(User.class, map.get("updatedAuthor"), restclient);
}

View File

@ -453,7 +453,7 @@ public class Issue extends Resource {
project = Field.getResource(Project.class, fields.get(Field.PROJECT), restclient);
reporter = Field.getResource(User.class, fields.get(Field.REPORTER), restclient);
resolution = Field.getResource(Resolution.class, fields.get(Field.RESOLUTION), restclient);
resolutionDate = Field.getDate(fields.get(Field.RESOLUTION_DATE));
resolutionDate = Field.getDateTime(fields.get(Field.RESOLUTION_DATE));
status = Field.getResource(Status.class, fields.get(Field.STATUS), restclient);
subtasks = Field.getResourceArray(Issue.class, fields.get(Field.SUBTASKS), restclient);
summary = Field.getString(fields.get(Field.SUMMARY));

View File

@ -68,7 +68,6 @@ public class TokenCredentials implements ICredentials {
return username;
}
@Override
public void initialize(RestClient client) throws JiraException {
if (token==null) {
try {
@ -83,7 +82,6 @@ public class TokenCredentials implements ICredentials {
}
}
@Override
public void logout(RestClient client) throws JiraException {
if (token != null) {
try {