Make remote fetcher's value normalization more type safe
This commit is contained in:
parent
8f56b1874b
commit
f95a704787
|
@ -82,8 +82,11 @@ public class RemoteFetcherUtils {
|
||||||
if (jarr.get(0) instanceof String) {
|
if (jarr.get(0) instanceof String) {
|
||||||
return jarr.get(0).toString();
|
return jarr.get(0).toString();
|
||||||
} else {
|
} else {
|
||||||
return ((Map<String, String>)jarr.get(0)).get("content");
|
for (Object o : jarr) {
|
||||||
|
if ((o instanceof Map) && ((Map) o).containsKey("content")) {
|
||||||
|
return ((Map<String, String>) o).get("content");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (value instanceof Map) {
|
} else if (value instanceof Map) {
|
||||||
return ((Map<String, String>)value).get("content");
|
return ((Map<String, String>)value).get("content");
|
||||||
|
|
Loading…
Reference in New Issue