owlcs / owlapi

OWL API main repository
821 stars 315 forks source link

AxiomSubjectProviderEx does not honor SWRL rules with empty head #1069

Closed RalphBln closed 1 year ago

RalphBln commented 2 years ago

The following line does not check for possible emptiness of rule.head():

https://github.com/owlcs/owlapi/blob/e0e9ef7690caa7f182bcf4d45b0a443545ac8bb3/api/src/main/java/org/semanticweb/owlapi/util/AxiomSubjectProviderEx.java#L245

In the presence of a rule with an empty head an uncaught NoSuchElementException is thrown. As one of the noticeable consequences Protégé's search window stops working completely without an error message.