Changeset 155 for trunk/corelib/src/org/bridgedb/file/IDMapperFile.java
- Timestamp:
- 08/12/09 07:56:10 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/corelib/src/org/bridgedb/file/IDMapperFile.java
r153 r155 72 72 public Map<Xref, Set<Xref>> mapID(final Set<Xref> srcXrefs, 73 73 final Set<DataSource> tgtDataSources) throws IDMapperException { 74 if (srcXrefs==null || tgtDataSources==null) {74 if (srcXrefs==null) { 75 75 throw new IllegalArgumentException("srcXrefs or tgtDataSources cannot be null"); 76 76 } … … 80 80 // remove unsupported target datasources 81 81 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 84 90 if (tgtDss.isEmpty()) { 85 91 return result;
