Changeset 5626


Ignore:
Timestamp:
May 9, 2011, 8:45:49 AM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1585: Problem with 'null' parameter values in plug-in configuration when handling errors

Found another null issue in the test programs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.17-stable/src/core/net/sf/basedb/core/ParameterValuesImpl.java

    r5585 r5626  
    196196    type.validate(name, values);
    197197    // Create copy of list but remove null values
    198     ArrayList<T> l = new ArrayList<T>(values.size());
    199     for (T value : values)
    200     {
    201       if (value != null) l.add(value);
     198    ArrayList<T> l = new ArrayList<T>(values == null ? 0 : values.size());
     199    if (values != null)
     200    {
     201      for (T value : values)
     202      {
     203        if (value != null) l.add(value);
     204      }
    202205    }
    203206    parameters.put(name, l);
Note: See TracChangeset for help on using the changeset viewer.