Jackson gives us {"repo": {"mirrors": ["foo", "bar"] as ArrayList
I was optimistic and guessed it was a String[], since that's what is needed. Found by @cde while working on #35
This commit is contained in:
parent
2a7fe78483
commit
6c247e3201
@ -289,10 +289,12 @@ public class IndexV1Updater extends RepoUpdater {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private String[] getStringArrayRepoValue(Map<String, Object> repoMap, String key) {
|
private String[] getStringArrayRepoValue(Map<String, Object> repoMap, String key) {
|
||||||
Object value = repoMap.get(key);
|
Object value = repoMap.get(key);
|
||||||
if (value != null && value instanceof String[]) {
|
if (value != null && value instanceof ArrayList) {
|
||||||
return (String[]) value;
|
ArrayList<String> list = (ArrayList<String>) value;
|
||||||
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user