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

[uima-uimaj] branch bugfix/UIMA-6473-CasToComparableText-is-broken created (now d88e91e1d)

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

rec pushed a change to branch bugfix/UIMA-6473-CasToComparableText-is-broken
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git


      at d88e91e1d [UIMA-6473] CasToComparableText is broken

This branch includes the following new commits:

     new d88e91e1d [UIMA-6473] CasToComparableText is broken

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[uima-uimaj] 01/01: [UIMA-6473] CasToComparableText is broken

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rec pushed a commit to branch bugfix/UIMA-6473-CasToComparableText-is-broken
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git

commit d88e91e1db6702c7ab52486ff2743e5c0e32d727
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Wed Jun 22 09:24:07 2022 +0200

    [UIMA-6473] CasToComparableText is broken
    
    - Add missing else
    - Fix use of wrong variable in if statement
---
 .../src/test/java/org/apache/uima/cas/serdes/CasToComparableText.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/uimaj-core/src/test/java/org/apache/uima/cas/serdes/CasToComparableText.java b/uimaj-core/src/test/java/org/apache/uima/cas/serdes/CasToComparableText.java
index 3a79a98d4..6d8a0475f 100644
--- a/uimaj-core/src/test/java/org/apache/uima/cas/serdes/CasToComparableText.java
+++ b/uimaj-core/src/test/java/org/apache/uima/cas/serdes/CasToComparableText.java
@@ -717,7 +717,7 @@ public class CasToComparableText {
           values.stream().filter(v -> v instanceof FeatureStructure).filter(v -> !seen.contains(v))
                   .forEach(v -> toProcess.add((FeatureStructure) v));
         }
-
+      } else {
         for (Feature feature : fs.getType().getFeatures()) {
           if (feature.getRange().isPrimitive()) {
             continue;
@@ -736,7 +736,7 @@ public class CasToComparableText {
             List<Object> featureValues = multiValuedFeatureStructureToList(
                     fs.getFeatureValue(feature));
 
-            if (values != null) {
+            if (featureValues != null) {
               for (Object value : featureValues) {
                 if (value instanceof FeatureStructure && !seen.contains(value)) {
                   toProcess.add((FeatureStructure) value);