Changeset 5853


Ignore:
Timestamp:
Mar 6, 2020, 1:44:37 PM (21 months ago)
Author:
Nicklas Nordborg
Message:

Fixes #1230: NullPointerException? in the "Map external data" wizard

Found 2 cases in the export wizard and 2 more cases in the relase exporter plug-in that could be triggered by a sequencer wihtout serial number or a demux without a read-string.

Location:
extensions/net.sf.basedb.reggie/branches/4.25-stable/src/net/sf/basedb/reggie
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/4.25-stable/src/net/sf/basedb/reggie/plugins/release/MergedWriter.java

    r5550 r5853  
    176176    for (SequencingRun sr : sequencingRuns)
    177177    {
    178       sequencers.add((String)item.getAnnotationValue(Annotationtype.SERIAL_NUMBER, sr.getItem().getHardware()));
     178      String sn = (String)item.getAnnotationValue(Annotationtype.SERIAL_NUMBER, sr.getItem().getHardware());
     179      if (sn != null) sequencers.add(sn);
    179180    }
    180181    return sequencers;
     
    191192    for (DemuxedSequences dx : demuxedSequences)
    192193    {
    193       readStrings.add((String)item.getAnnotationValue(Annotationtype.READ_STRING, dx.getItem()));
     194      String rs = (String)item.getAnnotationValue(Annotationtype.READ_STRING, dx.getItem());
     195      if (rs != null) readStrings.add(rs);
    194196    }
    195197    return readStrings;
  • extensions/net.sf.basedb.reggie/branches/4.25-stable/src/net/sf/basedb/reggie/servlet/ExportServlet.java

    r5740 r5853  
    18721872        for (Sample s : specimen)
    18731873        {
    1874           allPad.add((String)Annotationtype.PAD.getAnnotationValue(dc, manager, s));
     1874          String p = (String)Annotationtype.PAD.getAnnotationValue(dc, manager, s);
     1875          if (p != null) allPad.add(p);
    18751876        }
    18761877        pad = Values.getString(allPad, ",", true);
     
    19191920        for (Sample s : items)
    19201921        {
    1921           allId.add(s.getExternalId());
     1922          String id = s.getExternalId();
     1923          if (id != null) allId.add(id);
    19221924        }
    19231925        idValues = Values.getString(allId, ",", true);
Note: See TracChangeset for help on using the changeset viewer.