NPE in AGREE validator checkNamedElement(NamedElement)
Closed this issue · 2 comments
kfhoech commented
In the AgreeValidator.checkNamedElement(NamedElement) at the line
if (namedEl.getName().equals(feat.getName())) {
the call to getName() on namedEl
may result in a null
value generating an NPE on the .equals(...)
kfhoech commented
The root of the problem is that NamedSpecStatements such as AssumeStatement, GuaranteeStatement, AssertStatement, LemmaStatement, and ReachableStatement are optionally named.
The fix for this issue, however, is quick. Since it is allowed for multiple such statements to be unnamed (that is, a null name), simply check that the name is not null before comparing to other names.