From 24d0ea0d9b3036ce81a979cb8302d0ba25fe9fa7 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 21 Apr 2008 16:31:50 -0600 Subject: [PATCH] use StackTraceElement.toString in Throwable.printStackTrace --- classpath/java/lang/Throwable.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/classpath/java/lang/Throwable.java b/classpath/java/lang/Throwable.java index 5250a380af..333a156166 100644 --- a/classpath/java/lang/Throwable.java +++ b/classpath/java/lang/Throwable.java @@ -101,21 +101,7 @@ public class Throwable { StackTraceElement[] trace = resolveTrace(); for (int i = 0; i < trace.length; ++i) { - sb.append(" at ") - .append(trace[i].getClassName()) - .append(".") - .append(trace[i].getMethodName()); - - if (trace[i].isNativeMethod()) { - sb.append(" (native)"); - } else { - int line = trace[i].getLineNumber(); - if (line >= 0) { - sb.append(" (line ").append(line).append(")"); - } - } - - sb.append(nl); + sb.append(" at ").append(trace[i].toString()).append(nl); } if (cause != null) {