ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1884880 - /ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/LabValueFinder.java
Date Mon, 28 Dec 2020 15:34:11 GMT
Author: seanfinan
Date: Mon Dec 28 15:34:10 2020
New Revision: 1884880

URL: http://svn.apache.org/viewvc?rev=1884880&view=rev
Log:
Just in case there was a problem with the map of collections

Modified:
    ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/LabValueFinder.java

Modified: ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/LabValueFinder.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/LabValueFinder.java?rev=1884880&r1=1884879&r2=1884880&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/LabValueFinder.java (original)
+++ ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/ae/LabValueFinder.java Mon
Dec 28 15:34:10 2020
@@ -369,7 +369,10 @@ final public class LabValueFinder extend
       final Map<Annotation, List<IdentifiedAnnotation>> allCovering = new HashMap<>();
       for ( Class covered : coveredClasses ) {
          for ( Class covering : coveringClasses ) {
-            allCovering.putAll( JCasUtil.indexCovering( jCas, covered, covering ) );
+            final Map<? extends Annotation, List<? extends IdentifiedAnnotation>>
map
+                  = JCasUtil.indexCovering( jCas, covered, covering );
+            map.forEach( ( k, v ) -> allCovering.computeIfAbsent( k, c -> new ArrayList<>()
)
+                                                .addAll( v ) );
          }
       }
       return allCovering;



Mime
View raw message