| author | Samuel Padgett | 2012-01-27 08:23:53 (EST) |
|---|---|---|
| committer | Michael Fiedler | 2012-01-27 09:26:17 (EST) |
| commit | b7550372a30b7039472e7cc0e1fd0c99e90570c0 (patch) (side-by-side diff) | |
| tree | 6ebfe5a84063989c89c2094c254cd7537506ab40 | |
| parent | 4dcf25385c224374d4615518878731965b2cb745 (diff) | |
| download | org.eclipse.lyo.server-b7550372a30b7039472e7cc0e1fd0c99e90570c0.zip org.eclipse.lyo.server-b7550372a30b7039472e7cc0e1fd0c99e90570c0.tar.gz org.eclipse.lyo.server-b7550372a30b7039472e7cc0e1fd0c99e90570c0.tar.bz2 | |
Bug 369922 - Bugzilla Adapter: Selection dialog not working
The Bugzilla selection dialog is not working after the upgrade to
j2bugzilla 1.0. We had some code in the ExtendedBugSearch class to
workaround a problem with searching in old versions of j2bugzilla, but
it's no longer needed (and is now causing problems). The fix is simply
to remove the workaround.
| -rw-r--r-- | org.eclipse.lyo.samples.bugzilla/src/main/java/org/eclipse/lyo/samples/bugzilla/jbugzx/rpc/ExtendedBugSearch.java | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/org.eclipse.lyo.samples.bugzilla/src/main/java/org/eclipse/lyo/samples/bugzilla/jbugzx/rpc/ExtendedBugSearch.java b/org.eclipse.lyo.samples.bugzilla/src/main/java/org/eclipse/lyo/samples/bugzilla/jbugzx/rpc/ExtendedBugSearch.java index c9855f9..7c17a8f 100644 --- a/org.eclipse.lyo.samples.bugzilla/src/main/java/org/eclipse/lyo/samples/bugzilla/jbugzx/rpc/ExtendedBugSearch.java +++ b/org.eclipse.lyo.samples.bugzilla/src/main/java/org/eclipse/lyo/samples/bugzilla/jbugzx/rpc/ExtendedBugSearch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011 IBM Corporation. + * Copyright (c) 2011, 2012 IBM Corporation. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -15,13 +15,7 @@ *******************************************************************************/ package org.eclipse.lyo.samples.bugzilla.jbugzx.rpc; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import com.j2bugzilla.base.Bug; -import com.j2bugzilla.base.BugFactory; import com.j2bugzilla.rpc.BugSearch; /** @@ -31,8 +25,6 @@ import com.j2bugzilla.rpc.BugSearch; * @author Samuel Padgett <spadgett@us.ibm.com> */ public class ExtendedBugSearch extends BugSearch { - private Map<Object, Object> hash = new HashMap<Object, Object>(); - public enum ExtendedSearchLimiter { /** * The maximum number of bugs to return. @@ -93,33 +85,4 @@ public class ExtendedBugSearch extends BugSearch { public void addQueryParam(ExtendedSearchLimiter limit, Object query) { getParameterMap().put(limit.getName(), query); } - - /** - * Returns the {@link Bug}s found by the query as a <code>List</code> - * @return a {@link List} of {@link Bug}s that match the query and limit - */ - public List<Bug> getSearchResults() { - List<Bug> results = new ArrayList<Bug>(); - /* - * The following is messy, but necessary due to how the returned XML document nests - * Maps. - */ - if(hash.containsKey("bugs")) { - Object[] bugs = (Object[])hash.get("bugs"); - for(Object o : bugs) { - @SuppressWarnings("unchecked") - Map<String, Object> bugMap = (HashMap<String, Object>)o; - // Work around a bug in j2bugzilla where version isn't correctly recognized. - Map<?, ?> internals = (Map<?, ?>) bugMap.get("internals"); - bugMap.put("version", internals.get("version")); - results.add(new BugFactory().createBug(bugMap)); - } - } - return results; - } - - @Override - public void setResultMap(Map<Object, Object> hash) { - this.hash = hash; - } } |

