Remove dummy GroupInfo class

The GroupInfo class extend JavaScriptObject which requires to have a
protected constructor which was not used.

Remove the class and use JavaScriptObject in the NativeMap instead.

Change-Id: Id231fc0e0185332974e58fcb1ab346b68b825dc9
This commit is contained in:
Hugo Arès
2015-09-25 14:20:06 -04:00
parent 1ebb9834dd
commit aaaf9faea6

View File

@@ -52,9 +52,9 @@ public class GroupSuggestOracle extends SuggestOracle {
if (req.getLimit() > 0) {
rest.addParameter("n", req.getLimit());
}
rest.get(new AsyncCallback<NativeMap<GroupInfo>>() {
rest.get(new AsyncCallback<NativeMap<JavaScriptObject>>() {
@Override
public void onSuccess(NativeMap<GroupInfo> result) {
public void onSuccess(NativeMap<JavaScriptObject> result) {
List<String> keys = result.sortedKeys();
List<Suggestion> suggestions = new ArrayList<>(keys.size());
for (String g : keys) {
@@ -74,11 +74,4 @@ public class GroupSuggestOracle extends SuggestOracle {
List<Suggestion> empty = Collections.emptyList();
done.onSuggestionsReady(req, new Response(empty));
}
private static class GroupInfo extends JavaScriptObject {
// Dummy class, does nothing.
protected GroupInfo() {
}
}
}