[
https://issues.apache.org/jira/browse/DERBY-3618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erlend Birkenes updated DERBY-3618:
-----------------------------------
Attachment: DERBY-3618_8.diff
Version 8: DERBY-3618_8.diff
Thanks for the comments Knut Anders! Better late than never :-) This patch
fixes most of the things you noted:
- Fixed indentation to use only spaces.
- Merged nested try/catch blocks in AssertFailure.dumpThreads() into one. We
cant simply use a catch clause for InvocationTargetException, because the
exception thrown is a PrivilegedActionException, containing an
InvocationTargetException, containing an AccessControlException which is the
one we really want. I changed the Exception clause instead to have only one
if/else. Looks much better now and makes more sense. Also by using getCause()
instead of getTargetException the cast was made superfluous.
- Simplified code in dumpThread() to Thread.class.getMethod(...) as you
suggested.
- Changed ByteArrayOutputStream to StringWriter. Don't know what I was thinking
here...
- Corrected package name in ThreadDump.java header.
- AssertFailureTest now use constant JVMInfo.J2SE_15 for better readability.
- AssertFailureTest.suite() now returns an empty suite in insane builds. (If
org.apache.derby.shared.common.sanity.AssertFailure doesn't exist.) This fixes
the error in the regression tests.
-Erlend
> Perform thread dump with ASSERTS with jdk 1.5 or higher
> -------------------------------------------------------
>
> Key: DERBY-3618
> URL: https://issues.apache.org/jira/browse/DERBY-3618
> Project: Derby
> Issue Type: Improvement
> Components: Services
> Affects Versions: 10.5.0.0
> Reporter: Kathey Marsden
> Assignee: Erlend Birkenes
> Priority: Minor
> Fix For: 10.5.0.0
>
> Attachments: DERBY-3618_1.diff, DERBY-3618_2.diff, DERBY-3618_3.diff,
> DERBY-3618_4.diff, DERBY-3618_5.diff, DERBY-3618_6.diff, DERBY-3618_7.diff,
> DERBY-3618_8.diff
>
>
> It would be good to have a stack traces for all threads dump to the derby.log
> when an assertion occurs with JVM's that support it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.