-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
It seems that retrofit requires the @QueryMap types to be explictly stated
ServiceService service = rancher.type(io.rancher.service.ServiceService.class);
Filters f = new Filters();
f.put("name", "testname");
Response<TypeCollection<Service>> response = service.list(f).execute();produces
java.lang.IllegalArgumentException: Map must include generic types (e.g., Map<String, String>) (parameter #1)
for method ServiceService.list
This simple patch fixed it:
diff --git a/src/main/java/io/rancher/base/Filters.java b/src/main/java/io/rancher/base/Filters.java
index da9e8b9..23b1130 100644
--- a/src/main/java/io/rancher/base/Filters.java
+++ b/src/main/java/io/rancher/base/Filters.java
@@ -2,5 +2,5 @@ package io.rancher.base;
import java.util.HashMap;
-public class Filters extends HashMap<String, String> {
+public class Filters<K,V> extends HashMap<K, V> {
}Followed by a ack Filters -l | xargs sed -ri 's/Filters filters/Filters<String, String> filters/'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels