summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2017-04-17 15:32:32 -0400
committerFrank Becker2017-06-20 16:15:11 -0400
commit1b0cf590566558e26da4515a1cf700ae700f5e48 (patch)
treeae5edcb82fec85e361129500e3c82237960b3965
parentd268c05aeb2fe3937bff73a099d09238ae61e3b9 (diff)
downloadorg.eclipse.mylyn.tasks-1b0cf590566558e26da4515a1cf700ae700f5e48.tar.gz
org.eclipse.mylyn.tasks-1b0cf590566558e26da4515a1cf700ae700f5e48.tar.xz
org.eclipse.mylyn.tasks-1b0cf590566558e26da4515a1cf700ae700f5e48.zip
515347: BugzillaRestGetTaskAttachments: is_patch and is_obsolete have
wrong datatyp Change-Id: I2862b6b1fadd677bd1bbcd7e7121ba83ef4a6fa6 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=515347
-rw-r--r--connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskAttachments.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskAttachments.java b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskAttachments.java
index fce79265f..f65584716 100644
--- a/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskAttachments.java
+++ b/connector-bugzilla-rest/org.eclipse.mylyn.bugzilla.rest.core/src/org/eclipse/mylyn/internal/bugzilla/rest/core/BugzillaRestGetTaskAttachments.java
@@ -51,9 +51,8 @@ public class BugzillaRestGetTaskAttachments extends BugzillaRestGetRequest<Array
protected ArrayList<TaskAttribute> parseFromJson(InputStreamReader in) {
TypeToken<ArrayList<TaskAttribute>> type = new TypeToken<ArrayList<TaskAttribute>>() {
};
- return new GsonBuilder().registerTypeAdapter(type.getType(), new JSonTaskDataDeserializer())
- .create()
- .fromJson(in, type.getType());
+ return new GsonBuilder().registerTypeAdapter(type.getType(), new JSonTaskDataDeserializer()).create().fromJson(
+ in, type.getType());
}
BugzillaRestTaskSchema taskSchema = BugzillaRestTaskSchema.getDefault();
@@ -95,12 +94,10 @@ public class BugzillaRestGetTaskAttachments extends BugzillaRestGetRequest<Array
}
attachmentMapper.setContentType(attachmentObject.get("content_type").getAsString()); //$NON-NLS-1$
attachmentMapper.setDeprecated(attachmentObject.get("is_obsolete") //$NON-NLS-1$
- .getAsString()
- .equals(Integer.valueOf(1)));
+ .getAsBoolean());
attachmentMapper.setDescription(attachmentObject.get("summary").getAsString()); //$NON-NLS-1$
attachmentMapper.setFileName(attachmentObject.get("file_name").getAsString()); //$NON-NLS-1$
- attachmentMapper
- .setPatch(attachmentObject.get("is_patch").getAsString().equals(Integer.valueOf(1))); //$NON-NLS-1$
+ attachmentMapper.setPatch(attachmentObject.get("is_patch").getAsBoolean()); //$NON-NLS-1$
attachmentMapper.applyTo(attachmentAttribute);
JsonArray flags = attachmentObject.get("flags").getAsJsonArray(); //$NON-NLS-1$
if (flags.size() > 0) {