You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Gregg, John E." <Jo...@wellsfargo.com> on 2004/10/18 22:49:26 UTC
[PATCH] NPE in commons-id ReadOnlyResourceStateImpl
Commons-id has a NullPointerException in ReadOnlyResourceStateImpl being
thrown from a finally block that's masking any exception thrown in the try
block. I fixed it.
Also, I changed the catch block to explicitly catch IllegalStateException
and rethrow it in order to preserve the stack trace. The previous
implementation caught all Throwables, extracted their message, and threw a
new IllegalStateException with the message, thus creating a stack trace that
led to the catch block and not the actual line where the error occurred.
I can't cvs out from behind our proxy, so I used cygwin's diff to generate
the patches. I added a test to expose the NullPointerException problem. My
codebase was current as of Friday.
thanks
John Gregg