Changeset 4629


Ignore:
Timestamp:
Nov 6, 2008, 9:26:09 AM (15 years ago)
Author:
Nicklas Nordborg
Message:

References #1162: Raw bioassay importer fails with InvalidUseOfNullException? when raw data type is not found

The last fix ([4622]) created a problem with file-only platforms that has an implicit raw data type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/RawBioAssayImporter.java

    r4622 r4629  
    329329      variant = getProjectDefaultVariant(dc);
    330330    }
    331     if (rawDataTypeMapper != null)
    332     {
    333       rawDataType = RawDataTypes.getSafeRawDataType(rawDataTypeMapper.getValue(data));
    334     }
    335     else
    336     {
    337       rawDataType = getProjectDefaultRawDataType(dc);
     331    if (variant != null && rawDataType == null) rawDataType = variant.getRawDataType();
     332    if (platform != null && rawDataType == null) rawDataType = platform.getRawDataType();
     333    if (rawDataType == null)
     334    {
     335      if (rawDataTypeMapper != null)
     336      {
     337        rawDataType = RawDataTypes.getSafeRawDataType(rawDataTypeMapper.getValue(data));
     338      }
     339      else
     340      {
     341        rawDataType = getProjectDefaultRawDataType(dc);
     342      }
    338343    }
    339344   
     
    383388        variant = findVariant(dc, platform, FallbackIdMethod.NAME_OR_EXTERNALID_OR_ID, variantMapper.getValue(data));
    384389      }
    385       if (rawDataTypeMapper != null)
     390      if (variant != null && rawDataType == null) rawDataType = variant.getRawDataType();
     391      if (platform != null && rawDataType == null) rawDataType = platform.getRawDataType();
     392      if (rawDataType == null && rawDataTypeMapper != null)
    386393      {
    387394        rawDataType = RawDataTypes.getSafeRawDataType(rawDataTypeMapper.getValue(data));
Note: See TracChangeset for help on using the changeset viewer.