Show
Ignore:
Timestamp:
08/19/09 09:44:30 (3 years ago)
Author:
martijn
Message:

Fixes spurious DataSource? entries.
There was a problem where each call go getByFullName / getBySystemCode
with an empty string would lead to creation of a new DataSource? entry

Files:
1 modified

Legend:

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

    r136 r162  
    340340        public static DataSource getBySystemCode(String systemCode) 
    341341        { 
    342                 if (!bySysCode.containsKey(systemCode)) 
     342                if (!bySysCode.containsKey(systemCode) && isSuitableKey(systemCode)) 
    343343                { 
    344344                        register (systemCode, null); 
     
    356356        public static DataSource getByFullName(String fullName) 
    357357        { 
    358                 if (!byFullName.containsKey(fullName)) 
     358                if (!byFullName.containsKey(fullName) && isSuitableKey(fullName)) 
    359359                { 
    360360                        register (null, fullName);