Skip to content

Commit 3128243

Browse files
committed
Fix missing null handling when a term is missing from an model
1 parent fe7225a commit 3128243

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ubic/basecode/ontology/providers/AbstractOntologyService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ private void initSearchByAlternativeId() {
466466
private OntologyTerm getTermInternal( String uri ) {
467467
return termCache.computeIfAbsent( uri, u -> {
468468
OntClass ontCls = model.getOntClass( u );
469-
// bnode
470-
if ( ontCls.getURI() == null ) {
469+
// null or bnode
470+
if ( ontCls == null || ontCls.getURI() == null ) {
471471
return null;
472472
}
473473
return new OntologyTermImpl( ontCls );

0 commit comments

Comments
 (0)