Show
Ignore:
Timestamp:
08/12/09 07:56:10 (3 years ago)
Author:
jgao
Message:

IDMapperPicrBiomart, IDMapperFile bug fix for tgtDataSources=null

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/corelib/src/org/bridgedb/file/IDMapperFile.java

    r153 r155  
    7272    public Map<Xref, Set<Xref>> mapID(final Set<Xref> srcXrefs, 
    7373                final Set<DataSource> tgtDataSources) throws IDMapperException { 
    74         if (srcXrefs==null || tgtDataSources==null) { 
     74        if (srcXrefs==null) { 
    7575            throw new IllegalArgumentException("srcXrefs or tgtDataSources cannot be null"); 
    7676        } 
     
    8080        // remove unsupported target datasources 
    8181        Set<DataSource> supportedTgtDatasources = cap.getSupportedTgtDataSources(); 
    82         Set<DataSource> tgtDss = new HashSet(tgtDataSources); 
    83         tgtDss.retainAll(supportedTgtDatasources); 
     82        Set<DataSource> tgtDss; 
     83        if (tgtDataSources==null) { 
     84            tgtDss = new HashSet(cap.getSupportedTgtDataSources()); 
     85        } else { 
     86            tgtDss = new HashSet(tgtDataSources); 
     87            tgtDss.retainAll(supportedTgtDatasources); 
     88        } 
     89 
    8490        if (tgtDss.isEmpty()) { 
    8591            return result;