Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import jakarta.persistence.criteria.*;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.client.methods.HttpGet;
Expand Down Expand Up @@ -793,8 +794,18 @@ Object processPathSegment(int index, String[] pathParts, JsonValue curPath, Stri
}

} else {
curPath = ((JsonObject) curPath).get(pathParts[index]);
logger.fine("Found next Path object " + curPath);
if ((curPath instanceof JsonArray) && NumberUtils.isCreatable(pathParts[index])) {
try {
int indexNumber = Integer.parseInt(pathParts[index]);
curPath = ((JsonArray) curPath).get(indexNumber);
} catch (NumberFormatException nfe) {
logger.fine("Please provide a valid integer number " + pathParts[index]);
}
} else {
curPath = ((JsonObject) curPath).get(pathParts[index]);
}
// curPath = ((JsonObject) curPath).get(pathParts[index]);
logger.fine("Found next Path object " + ((curPath == null) ? "null" : curPath.toString()));
return processPathSegment(index + 1, pathParts, curPath, termUri);
}
} else {
Expand Down