diff options
author | jfrijters <jfrijters> | 2004-10-19 18:23:39 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2004-10-19 18:23:39 +0400 |
commit | f9a187316d9c513dc4089e60467bf888881ef334 (patch) | |
tree | 979041f42737ff26c45f23143853e35677805cfc /classpath/java/lang/ExceptionHelper.java | |
parent | 59d57765d38758a2348aa1b6caac0d2a95e0b77a (diff) |
*** empty log message ***
Diffstat (limited to 'classpath/java/lang/ExceptionHelper.java')
-rw-r--r-- | classpath/java/lang/ExceptionHelper.java | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/classpath/java/lang/ExceptionHelper.java b/classpath/java/lang/ExceptionHelper.java index 308f749f..df7cac49 100644 --- a/classpath/java/lang/ExceptionHelper.java +++ b/classpath/java/lang/ExceptionHelper.java @@ -100,7 +100,7 @@ public final class ExceptionHelper { stackTrace = new cli.System.Collections.ArrayList(); int skip1 = 0; - if(t instanceof NullPointerException && tracePart1.get_FrameCount() > 0) + if(cleanStackTrace && t instanceof NullPointerException && tracePart1.get_FrameCount() > 0) { // HACK if a NullPointerException originated inside an instancehelper method, // we assume that the reference the method was called on was really the one that was null, @@ -115,20 +115,23 @@ public final class ExceptionHelper if(tracePart2 != null) { int skip = 0; - while(tracePart2.get_FrameCount() > skip && - tracePart2.GetFrame(skip).GetMethod().get_DeclaringType().get_FullName().startsWith("java.lang.ExceptionHelper")) + if(cleanStackTrace) { - skip++; - } - if(tracePart1.get_FrameCount() > 0 && - tracePart2.get_FrameCount() > skip && - tracePart1.GetFrame(tracePart1.get_FrameCount() - 1).GetMethod() == tracePart2.GetFrame(skip).GetMethod()) - { - skip++; + while(tracePart2.get_FrameCount() > skip && + tracePart2.GetFrame(skip).GetMethod().get_DeclaringType().get_FullName().startsWith("java.lang.ExceptionHelper")) + { + skip++; + } + if(tracePart1.get_FrameCount() > 0 && + tracePart2.get_FrameCount() > skip && + tracePart1.GetFrame(tracePart1.get_FrameCount() - 1).GetMethod() == tracePart2.GetFrame(skip).GetMethod()) + { + skip++; + } } Append(stackTrace, tracePart2, skip); } - if(stackTrace.get_Count() > 0) + if(cleanStackTrace && stackTrace.get_Count() > 0) { StackTraceElement elem = (StackTraceElement)stackTrace.get_Item(stackTrace.get_Count() - 1); if(elem.getClassName().equals("java.lang.reflect.Method")) |