commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregg, John E." <>
Subject [PATCH] NPE in commons-id ReadOnlyResourceStateImpl
Date Mon, 18 Oct 2004 20:49:26 GMT
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.
John Gregg

View raw message