This is an automated email from the ASF dual-hosted git repository.

tkobayas pushed a commit to branch dev-new-parser
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git


The following commit(s) were added to refs/heads/dev-new-parser by this push:
     new 9857aac507 Improve Verifier's consequence processing resiliency (#5887)
9857aac507 is described below

commit 9857aac5072f88ee09940879afc1cf1644368689
Author: Jiří Locker <[email protected]>
AuthorDate: Tue May 7 04:42:47 2024 +0200

    Improve Verifier's consequence processing resiliency (#5887)
---
 .../src/main/java/org/drools/verifier/visitor/RuleDescrVisitor.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/visitor/RuleDescrVisitor.java
 
b/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/visitor/RuleDescrVisitor.java
index 9a614cda74..ca6f99b68c 100644
--- 
a/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/visitor/RuleDescrVisitor.java
+++ 
b/drools-verifier/drools-verifier-drl/src/main/java/org/drools/verifier/visitor/RuleDescrVisitor.java
@@ -200,6 +200,10 @@ public class RuleDescrVisitor extends 
ConditionalElementDescrVisitor {
          * Strip all comments out of the code.
          */
         StringBuilder buffer = new StringBuilder(text);
+
+        // Make sure there is a '\n' at the end of a comment even if it's the 
last line of the consequence.
+        buffer.append('\n');
+
         int commentIndex = buffer.indexOf("//");
 
         while (commentIndex != -1) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to