From 25275933ce9b925a5a316e390150a4a3f3a4c197 Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Thu, 25 Oct 2007 17:57:56 -0600 Subject: [PATCH] Print line numbers correctly for native and unknown source --- classpath/java/util/logging/Logger.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/classpath/java/util/logging/Logger.java b/classpath/java/util/logging/Logger.java index 927be42175..a60551815b 100644 --- a/classpath/java/util/logging/Logger.java +++ b/classpath/java/util/logging/Logger.java @@ -93,7 +93,14 @@ public class Logger { sb.append(elt.getMethodName()); sb.append("(line"); sb.append(':'); - sb.append(elt.getLineNumber()); + int lineNumber = elt.getLineNumber(); + if (lineNumber == -2) { + sb.append("unknown"); + } else if (lineNumber == -1) { + sb.append("native"); + } else { + sb.append(lineNumber); + } sb.append(')'); sb.append('\n'); }