git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2755 correct Javadoc and error handling
[jalview.git]
/
src
/
jalview
/
ext
/
ensembl
/
EnsemblLookup.java
diff --git
a/src/jalview/ext/ensembl/EnsemblLookup.java
b/src/jalview/ext/ensembl/EnsemblLookup.java
index
5f353f8
..
82690a3
100644
(file)
--- a/
src/jalview/ext/ensembl/EnsemblLookup.java
+++ b/
src/jalview/ext/ensembl/EnsemblLookup.java
@@
-131,7
+131,7
@@
public class EnsemblLookup extends EnsemblRestClient
/**
* Returns the gene id related to the given identifier (which may be for a
/**
* Returns the gene id related to the given identifier (which may be for a
- * gene, transcript or protein)
+ * gene, transcript or protein), or null if none is found
*
* @param identifier
* @return
*
* @param identifier
* @return
@@
-143,7
+143,7
@@
public class EnsemblLookup extends EnsemblRestClient
/**
* Returns the gene id related to the given identifier (which may be for a
/**
* Returns the gene id related to the given identifier (which may be for a
- * gene, transcript or protein)
+ * gene, transcript or protein), or null if none is found
*
* @param identifier
* @param objectType
*
* @param identifier
* @param objectType
@@
-165,6
+165,10
@@
public class EnsemblLookup extends EnsemblRestClient
*/
protected String parseGeneId(JSONObject val)
{
*/
protected String parseGeneId(JSONObject val)
{
+ if (val == null)
+ {
+ return null;
+ }
String geneId = null;
String type = val.get(OBJECT_TYPE).toString();
if (OBJECT_TYPE_GENE.equalsIgnoreCase(type))
String geneId = null;
String type = val.get(OBJECT_TYPE).toString();
if (OBJECT_TYPE_GENE.equalsIgnoreCase(type))