Skip to content

Commit

Permalink
use null signature to avoid exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
aeberhart committed Oct 29, 2023
1 parent 97813fa commit 48f60a1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions dashjoin-core/src/test/java/org/dashjoin/service/ModelTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ void checkExpressions(JsonNode tree) throws Exception {
if (kid.getKey().equals(field)) {
String expr = kid.getValue().asText();

// exceptions
if (expr.contains("$read("))
continue;
if (expr.contains("$echo("))
continue;

if (!(kid.getValue() instanceof ObjectNode)) {
Assertions.assertTrue(expr.startsWith("{") || expr.startsWith("$")
|| expr.startsWith("value.") || expr.startsWith("("));
Expand All @@ -194,7 +188,7 @@ public Object call(Object input, @SuppressWarnings("rawtypes") List args)
throws Throwable {
return null;
}
}, "<a?a?a?a?:s>");
}, null);
jsonata.registerFunction("gitPull", x);
jsonata.registerFunction("gitStatus", x);
jsonata.registerFunction("djRoles", x);
Expand All @@ -221,11 +215,6 @@ public Object call(Object input, @SuppressWarnings("rawtypes") List args)
throw e;
}
}
// JsonNode expr = kid.getValue().get("dj-expr");
// Assertions.assertEquals(1, expr.size());
// Entry<String, JsonNode> op = expr.fields().next();
// Assertions.assertTrue(Arrays.asList("object", "trigger",
// "call").contains(op.getKey()));
}
}
}
Expand Down

0 comments on commit 48f60a1

Please sign in to comment.