diff --git a/src/main/java/io/cryostat/expressions/MatchExpressionEvaluator.java b/src/main/java/io/cryostat/expressions/MatchExpressionEvaluator.java index 4a14bf3a9..6e257a5e0 100644 --- a/src/main/java/io/cryostat/expressions/MatchExpressionEvaluator.java +++ b/src/main/java/io/cryostat/expressions/MatchExpressionEvaluator.java @@ -274,9 +274,9 @@ public List getCompileOptions() { return List.of( EnvOption.declarations( Decls.newFunction( - "eventTypeIds", + "jfrEventTypeIds", Decls.newOverload( - "eventTypeIds_void", + "jfrEventTypeIds_void", List.of( Decls.newObjectType( SimplifiedTarget.class.getName())), @@ -288,14 +288,14 @@ public List getProgramOptions() { return List.of( ProgramOption.functions( Overload.unary( - "eventTypeIds", + "jfrEventTypeIds", (arg) -> ListT.newStringArrayList( - getEventTypeIds( + getJfrEventTypeIds( (SimplifiedTarget) arg.value()))))); } - private String[] getEventTypeIds(SimplifiedTarget st) { + private String[] getJfrEventTypeIds(SimplifiedTarget st) { Target target = Target.find("id", st.id()).singleResult(); try { return connectionManager.executeConnectedTask( diff --git a/src/test/java/io/cryostat/expressions/MatchExpressionsTest.java b/src/test/java/io/cryostat/expressions/MatchExpressionsTest.java index dddeda4a2..9167af8a1 100644 --- a/src/test/java/io/cryostat/expressions/MatchExpressionsTest.java +++ b/src/test/java/io/cryostat/expressions/MatchExpressionsTest.java @@ -80,9 +80,9 @@ public void testPostWithoutTargets() { "this is garbage | 400 | false", "target.alias == 'selftest' | 200 | true", "target.alias == '' | 200 | false", - "eventTypeIds(target).exists(x, x.contains('jdk')) | 200 | true", - "eventTypeIds(target).exists(t, t.contains('nonsense')) | 200 | false", - "eventTypeIds(target).exists(x, t.contains('wrong binding')) | 400 | false", + "jfrEventTypeIds(target).exists(x, x.contains('jdk')) | 200 | true", + "jfrEventTypeIds(target).exists(t, t.contains('nonsense')) | 200 | false", + "jfrEventTypeIds(target).exists(x, t.contains('wrong binding')) | 400 | false", }) public void testExpressionTest(String expr, int status, boolean expectTargets) { int id = defineSelfCustomTarget();