Skip to content

Commit 3cf657f

Browse files
committed
@qqmyers additional suggestion
1 parent 9de4547 commit 3cf657f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/edu/harvard/iq/dataverse/DatasetFieldServiceBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ Object processPathSegment(int index, String[] pathParts, JsonValue curPath, Stri
794794
}
795795

796796
} else {
797-
if (NumberUtils.isCreatable(pathParts[index])) {
797+
if ((curPath instanceof JsonArray) && NumberUtils.isCreatable(pathParts[index])) {
798798
try {
799799
int indexNumber = Integer.parseInt(pathParts[index]);
800800
curPath = ((JsonArray) curPath).get(indexNumber);
@@ -805,7 +805,7 @@ Object processPathSegment(int index, String[] pathParts, JsonValue curPath, Stri
805805
curPath = ((JsonObject) curPath).get(pathParts[index]);
806806
}
807807
// curPath = ((JsonObject) curPath).get(pathParts[index]);
808-
logger.fine("Found next Path object " + curPath.toString());
808+
logger.fine("Found next Path object " + ((curPath == null) ? "null" : curPath.toString()));
809809
return processPathSegment(index + 1, pathParts, curPath, termUri);
810810
}
811811
} else {

0 commit comments

Comments
 (0)