File tree Expand file tree Collapse file tree
api/src/org/labkey/api/reader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -729,6 +729,7 @@ protected final Map<String, Object> convertValues(Object[] fields)
729729 boolean foundData = false ;
730730 for (int i = 0 ; i < _activeColumns .length ; i ++)
731731 {
732+ boolean isEmptyArray = false ;
732733 ColumnDescriptor column = _activeColumns [i ];
733734 if (_preserveEmptyString && null == column .missingValues )
734735 {
@@ -831,6 +832,12 @@ else if (column.clazz == MultiChoice.Array.class)
831832 // GitHub Issue 925: Not providing a MVTC value in an assay result throws error
832833 // convert blank to empty array, not null
833834 values [i ] = column .converter .convert (column .clazz , fld );
835+ if (values [i ] instanceof MultiChoice .Array array ) // TODO: make this more generic? instanceof List and/or instanceof java.sql.Array?
836+ {
837+ // If line is blank, array will be empty array instead of null
838+ if (array .isEmpty ())
839+ isEmptyArray = true ;
840+ }
834841 }
835842 else
836843 {
@@ -878,7 +885,7 @@ else if (ERROR_VALUE_USE_ORIGINAL.equals(column.errorValues))
878885 values [i ] = column .errorValues ;
879886 }
880887
881- if (values [i ] != null )
888+ if (values [i ] != null && ! isEmptyArray )
882889 foundData = true ;
883890 }
884891
You can’t perform that action at this time.
0 commit comments