Skip to content

Commit caa7623

Browse files
authored
Merge pull request #291 from edoweb/FRL-168
add additional check, if identifier is not provided as an array
2 parents 0f9f282 + e10a8b1 commit caa7623

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/helper/oai/WglMapper.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,13 @@ private List<String> getList(JsonNode n, String string) {
268268
private String getString(JsonNode n, String string) {
269269
StringBuffer result = new StringBuffer();
270270
JsonNode a = n.at(string);
271-
for (JsonNode item : a) {
272-
String str = item.asText("no Value found");
273-
result.append(str + " ,");
271+
if (a.isArray()) {
272+
for (JsonNode item : a) {
273+
String str = item.asText("no Value found");
274+
result.append(str + " ,");
275+
}
276+
} else {
277+
result.append(a.asText());
274278
}
275279
if (result.length() == 0)
276280
return null;

0 commit comments

Comments
 (0)