Description of problem:
When a StatefulKnowledgeSession.dispose() is called on already disposed session NullPointerException is thrown.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create new stateful session
2. dispose it
3. dispose it again
This is caused by users using dispose() as a way to clean the state of the session. I suppose that when session is disposed it should be unusable but in case of using it an understandable exception should be thrown (like AlreadyDisposedException). And the documentation should clearly state that disposed sessions are not to be used.
Edson Tirelli <firstname.lastname@example.org> updated the status of jira JBRULES-1880 to Resolved
Edson Tirelli <email@example.com> made a comment on jira JBRULES-1880
Fixed. Calling any session's method after disposing the session will now raise an IllegalStateException.
Edson Tirelli <firstname.lastname@example.org> updated the status of jira JBRULES-1880 to Closed
It is fixed now. Thank you
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
A Null Pointer Exception was thrown when calling StatefulKnowledgeSession.dispose() on already disposed session. The issue has been resolved, calling any session's method after disposing the session now raises