Skip to content

Commit

Permalink
fixing #271
Browse files Browse the repository at this point in the history
  • Loading branch information
erosb committed Feb 2, 2019
1 parent bad9b5a commit 13e148f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ Map<String, Object> withoutRef(JsonObject original) {
}

private JsonObject lookupObjById(JsonValue val, String idAttrVal) {
String idKeyword = val.ls.specVersion().idKeyword();
if (val instanceof JsonObject) {
JsonObject obj = (JsonObject) val;
if (obj.containsKey("$id") && obj.require("$id").requireString()
.equals(idAttrVal)) {
if (obj.containsKey(idKeyword)
&& obj.require(idKeyword).typeOfValue() == String.class
&& obj.require(idKeyword).requireString().equals(idAttrVal)) {
return obj;
}
for (String key : obj.keySet()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}

0 comments on commit 13e148f

Please sign in to comment.