aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj2013-05-22 07:55:04 (EDT)
committer2013-05-22 07:55:04 (EDT)
commit7f5baf4c62fb7cecc41773e4b1c69073f3ea8ff1 (patch)
tree72448bd0f7fd8e9b3c9d40b8a9140d483c80df2f
parent452e8780caa98abd1cdc21aeb00ca3e8461b7d13 (diff)
downloadorg.eclipse.lyo.docs-7f5baf4c62fb7cecc41773e4b1c69073f3ea8ff1.zip
org.eclipse.lyo.docs-7f5baf4c62fb7cecc41773e4b1c69073f3ea8ff1.tar.gz
org.eclipse.lyo.docs-7f5baf4c62fb7cecc41773e4b1c69073f3ea8ff1.tar.bz2
Bug 408682 : Class Cast exception when Bugzilla bug has no commentsrefs/changes/48/13048/1
Change-Id: I6bff185976af744e2d49d7faf4c21146176e8ad8 Signed-off-by: jljlmatu@jp.ibm.com
-rw-r--r--org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetComments.java2
-rw-r--r--org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetHistory.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetComments.java b/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetComments.java
index d4fabc4..078139a 100644
--- a/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetComments.java
+++ b/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetComments.java
@@ -90,7 +90,7 @@ public class GetComments implements BugzillaMethod {
if (commentsMap.containsKey("comments")) {//$NON-NLS-1$
Object[] comments = (Object[]) commentsMap.get("comments"); //$NON-NLS-1$
if (comments.length == 0) {
- return (Date[]) result.toArray(); // early return if map is empty;
+ return new Date[0]; // early return if map is empty;
}
for (Object o : comments) {
@SuppressWarnings("unchecked")
diff --git a/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetHistory.java b/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetHistory.java
index e7dabcb..ea8b981 100644
--- a/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetHistory.java
+++ b/org.eclipse.lyo.oslc4j.bugzilla.trs/src/main/java/org/eclipse/lyo/oslc4j/bugzilla/trs/GetHistory.java
@@ -81,7 +81,7 @@ public class GetHistory implements BugzillaMethod {
if (hash.containsKey("bugs")) { //$NON-NLS-1$
Object[] bugs = (Object[]) hash.get("bugs"); //$NON-NLS-1$
if (bugs.length == 0) {
- return (Date[]) result.toArray(); // early return if map is empty
+ return new Date[0]; // early return if map is empty
}
for (Object o : bugs) {
@SuppressWarnings("unchecked")