Skip to content
Advertisement

How to prevent NullPointerException in the finally clause in a Java Class in Domino agent

Java debugging information only returns null without stating the actual cause of the error in the finally clause of the try/catch and not sure on how to get rid of this error message or the cause of it which is related to the recycle method called.

Below is the error log:

JavaScript

Below are the functions being called

JavaScript

Any recommendation will be appreciated.

Advertisement

Answer

The order of recycle() should be updated in the reverse order of creation. The qDoc and vNav objects has been created from qView object. If recycle on qView is called first then other objects become null as well. And it’s always good practice to check for null before closing object in the finally block.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement