| ... |
... |
@@ -24,8 +24,8 @@ package fr.ird.observe.server.injector; |
|
24
|
24
|
|
|
25
|
25
|
import com.google.common.collect.ImmutableSet;
|
|
26
|
26
|
import com.google.gson.Gson;
|
|
27
|
|
-import org.apache.logging.log4j.Logger;
|
|
28
|
27
|
import org.apache.logging.log4j.LogManager;
|
|
|
28
|
+import org.apache.logging.log4j.Logger;
|
|
29
|
29
|
import org.debux.webmotion.server.call.Call;
|
|
30
|
30
|
import org.debux.webmotion.server.handler.ExecutorParametersInjectorHandler;
|
|
31
|
31
|
import org.debux.webmotion.server.mapping.Mapping;
|
| ... |
... |
@@ -72,14 +72,18 @@ public class ImmutableSetInjector implements ExecutorParametersInjectorHandler.I |
|
72
|
72
|
Objects.requireNonNull(parameterTree, "Le paramètre " + name + " n'as pas été trouvé, recompiler (parameter)!");
|
|
73
|
73
|
|
|
74
|
74
|
String[] values = (String[]) parameterTree.getValue();
|
|
75
|
|
- String value = values[0];
|
|
76
|
|
- if (!value.isEmpty() && !value.contains("[")) {
|
|
|
75
|
+ StringBuilder value = new StringBuilder(values[0]);
|
|
|
76
|
+ if ((value.length() > 0) && !value.toString().contains("[")) {
|
|
77
|
77
|
if (((ParameterizedTypeImpl) generic).getActualTypeArguments()[0].equals(String.class)) {
|
|
78
|
|
- value = "\"" + value + "\"";
|
|
|
78
|
+ value = new StringBuilder();
|
|
|
79
|
+ for (String s : values) {
|
|
|
80
|
+ value.append(", \"").append(s).append("\"");
|
|
|
81
|
+ }
|
|
|
82
|
+ value = new StringBuilder(value.substring(2));
|
|
79
|
83
|
}
|
|
80
|
|
- value = "[" + value + "]";
|
|
|
84
|
+ value = new StringBuilder("[" + value + "]");
|
|
81
|
85
|
}
|
|
82
|
|
- Collection o = gson.fromJson(value, generic);
|
|
|
86
|
+ Collection o = gson.fromJson(value.toString(), generic);
|
|
83
|
87
|
if (o != null) {
|
|
84
|
88
|
builder.addAll(o);
|
|
85
|
89
|
}
|