From: Keats K. <ke...@xa...> - 2005-05-26 17:14:35
|
OK, I looked at the code briefly. Here's one suggestion: The version test could be done once in a static block. Granted it's not really important to optimize stacktrace dumping, but it makes the code a bit cleaner as well. Keats Sample code: final private static boolean IS_PRE_1_4; static { boolean pre14; try { // Check whether we find the 1.4 method Throwable.getStackTrace(), if so, use 1.4's built-in // Exception chaining. Throwable.class.getDeclaredMethod("getStackTrace", new Class[] {}); pre14 = false; } catch (NoSuchMethodException nsmE) { pre14 = true; } IS_PRE_1_4 = pre14; } Endre Stølsvik wrote: >On Wed, 25 May 2005, Keats Kirsch wrote: > >| I'll try to take a look at this soon -- though probably not for 2.0. > >why not? > > |