ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1636653 - /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/collection/DefaultCollectionMap.java
Date Tue, 04 Nov 2014 17:22:46 GMT
Author: seanfinan
Date: Tue Nov  4 17:22:46 2014
New Revision: 1636653

URL: http://svn.apache.org/r1636653
Log:
Check for empty Collection value in addAll...

Modified:
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/collection/DefaultCollectionMap.java

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/collection/DefaultCollectionMap.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/collection/DefaultCollectionMap.java?rev=1636653&r1=1636652&r2=1636653&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/collection/DefaultCollectionMap.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/collection/DefaultCollectionMap.java
Tue Nov  4 17:22:46 2014
@@ -138,6 +138,9 @@ final public class DefaultCollectionMap<
     */
    @Override
    public <C extends Collection<V>> int addAllValues( final K key, final C values
) {
+      if ( values == null || values.isEmpty() ) {
+         return 0;
+      }
       T collection = _delegate.get( key );
       if ( collection == null ) {
          collection = _collectionCreator.createCollection();



Mime
View raw message