Show
Ignore:
Timestamp:
08/30/10 16:05:59 (21 months ago)
Author:
martijn
Message:

Fixes NPE when calling xrefExists with null DataSource?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/benchmarking/test/org/bridgedb/benchmarking/Base.java

    r247 r441  
    1212import org.bridgedb.IDMapperException; 
    1313import org.bridgedb.Xref; 
     14import org.bridgedb.bio.BioDataSource; 
    1415 
    1516import buildsystem.Measure; 
     
    2021{ 
    2122        static final Xref NONEXISTENT = new Xref("123", DataSource.getBySystemCode("??")); 
     23        static final Xref HALFNULL1 = new Xref("123", null); 
     24        static final Xref HALFNULL2 = new Xref(null, BioDataSource.ENTREZ_GENE); 
    2225         
    2326        /** 
     
    4750                // check that xrefexists doesn't lead to exception 
    4851                assertFalse (mapper.xrefExists(NONEXISTENT)); 
     52                assertFalse (mapper.xrefExists(HALFNULL1)); 
     53                assertFalse (mapper.xrefExists(HALFNULL2)); 
    4954                assertTrue (mapper.xrefExists(from)); 
    5055                assertTrue (mapper.xrefExists(to));