}\r
List<DbSourceProxy> srces=new ArrayList<DbSourceProxy>();\r
for (String ddb:defdb) {\r
- srces.addAll(sfetcher.getSourceProxy(ddb));\r
+ List<DbSourceProxy> srcesfordb=sfetcher.getSourceProxy(ddb);\r
+ if (srcesfordb!=null) {\r
+ srces.addAll(srcesfordb);\r
+ }\r
}\r
\r
// append the selected sequence sources to the default dbs\r
public List<DbSourceProxy> getSourceProxy(String db)\r
{\r
List<DbSourceProxy> dbs;\r
- Collection<DbSourceProxy> dblist = FETCHABLEDBS.get(db).values();\r
- if (dblist.size()>1)\r
- {\r
- DbSourceProxy[] l=dblist.toArray(new DbSourceProxy[0]);\r
+ Map<String,DbSourceProxy> dblist = FETCHABLEDBS.get(db);\r
+ if (dblist==null) {return new ArrayList<DbSourceProxy>();};\r
+ if (dblist.size()>1) {\r
+ DbSourceProxy[] l=dblist.values().toArray(new DbSourceProxy[0]);\r
int i=0;\r
String[] nm=new String[l.length];\r
for (DbSourceProxy s:l)\r
dbs.add(l[i]);\r
}\r
} else {\r
- dbs = new ArrayList<DbSourceProxy>(dblist);\r
+ dbs = new ArrayList<DbSourceProxy>(dblist.values());\r
}\r
return dbs;\r
}\r