tkobayas commented on code in PR #6469:
URL:
https://github.com/apache/incubator-kie-drools/pull/6469#discussion_r2397811145
##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/util/lambdareplace/MaterializedLambdaPredicate.java:
##########
@@ -76,6 +79,22 @@ private void createTestMethod(EnumDeclaration
classDeclaration) {
methodDeclaration.setBody(new BlockStmt(NodeList.nodeList(new
ReturnStmt(clone.getExpression()))));
}
+ /**
+ * recursively traverse the node tree and collect all RegexExpr
+ * @param node
+ * @return
+ */
+ private Collection<RegexExpr> collectRegexExpressions(Node node) {
+ if (node instanceof RegexExpr) {
+ return Collections.singletonList((RegexExpr) node);
+ } else {
+ return node.getChildNodes().stream()
+ .map(this::collectRegexExpressions)
+ .flatMap(Collection::stream)
+ .toList();
Review Comment:
Copilot is wrong. Compiler level of drools project is 17 now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]