You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless close is explicitly annotated with @EnsuresCalledMethods("this.resource", "close"), the analyser complains with required.method.not.called on the resource declaration.
This is expected behavior. The analysis is modular, meaning that it only analyzes each program element once. When analyzing element A (in this case, the field resource), the analysis is therefore only able to use the signature of some other element B (in this case, the method close()): it is not able to introspect into close() to see that it calls resources.close(). The @EnsuresCalledMethods annotation makes this information visible outside the method.
Unless
close
is explicitly annotated with@EnsuresCalledMethods("this.resource", "close")
, the analyser complains withrequired.method.not.called
on theresource
declaration.Is it a bug or expected behaviour?
The text was updated successfully, but these errors were encountered: