You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2022/01/07 17:11:06 UTC

[uima-ruta] branch maintenance/3.1.x updated: no issue: fix method sig

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

pkluegl pushed a commit to branch maintenance/3.1.x
in repository https://gitbox.apache.org/repos/asf/uima-ruta.git


The following commit(s) were added to refs/heads/maintenance/3.1.x by this push:
     new 11af409  no issue: fix method sig
11af409 is described below

commit 11af409f47632156147574b116727f9073299101
Author: Peter Klügl <pe...@averbis.com>
AuthorDate: Fri Jan 7 18:10:44 2022 +0100

    no issue: fix method sig
---
 .../main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java | 9 ++-------
 .../main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java | 2 +-
 .../src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java | 4 ++--
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java
index 7a00d31..6e134e1 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/AbstractRuleElement.java
@@ -125,19 +125,14 @@ public abstract class AbstractRuleElement extends RutaElement implements RuleEle
     return result;
   }
 
-  protected void doneMatching(RuleMatch ruleMatch, RuleApply ruleApply, RuleElement entryPoint,
-          RutaStream stream, InferenceCrowd crowd) {
+  protected void doneMatching(RuleMatch ruleMatch, RuleApply ruleApply, RutaStream stream,
+          InferenceCrowd crowd) {
     if (!ruleMatch.isApplied()) {
       ruleApply.add(ruleMatch, stream);
       if (ruleMatch.matchedCompletely()) {
         RutaRule rule = ruleMatch.getRule();
         rule.getEnvironment().acceptTempVariableValues(rule.getOwnLabels());
         rule.getRoot().applyRuleElements(ruleMatch, stream, crowd);
-//      } else if (entryPoint == null) {
-        // we may not clear all temp variables. there could be a valid future alternative match
-        // which requires a previous label
-//        // there was no dynamic lookahead, remove temp vars
-//        rule.getEnvironment().clearTempVariables(localVariables);
       }
       ruleMatch.setApplied(true);
     }
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java
index a38318c..e25038b 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElement.java
@@ -534,7 +534,7 @@ public class ComposedRuleElement extends AbstractRuleElement implements RuleElem
 
     // take care that failed matches wont be applied
     ruleMatch.setMatched(ruleMatch.matched && !failed);
-    doneMatching(ruleMatch, ruleApply, entryPoint, stream, crowd);
+    doneMatching(ruleMatch, ruleApply, stream, crowd);
     return asList(ruleMatch);
   }
 
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
index 55b6c72..a438cca 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaRuleElement.java
@@ -114,7 +114,7 @@ public class RutaRuleElement extends AbstractRuleElement {
               result.addAll(fallbackContinue);
             } else if (getContainer() instanceof RuleElementIsolator) {
               // TODO move and refactor this:
-              doneMatching(extendedMatch, ruleApply, entryPoint, stream, crowd);
+              doneMatching(extendedMatch, ruleApply, stream, crowd);
             }
           }
         }
@@ -329,7 +329,7 @@ public class RutaRuleElement extends AbstractRuleElement {
           result.addAll(fallbackContinue);
         } else {
           // should never happen!
-          doneMatching(ruleMatch, ruleApply, entryPoint, stream, crowd);
+          doneMatching(ruleMatch, ruleApply, stream, crowd);
         }
       }
     }