From 4cce66c3d7ac10f6fa40fe39867c504cba19ff1f Mon Sep 17 00:00:00 2001 From: Ranjit Mathew Date: Thu, 13 Feb 2003 09:33:18 +0000 Subject: [PATCH] NameFinder.java (createStackTraceElement): Use lastIndexOf( ) instead of indexOf( ) to find the colon before the line... 2002-02-13 Ranjit Mathew * gnu/gcj/runtime/NameFinder.java (createStackTraceElement): Use lastIndexOf( ) instead of indexOf( ) to find the colon before the line number, because Win32 file names might contain a drive letter and a colon at the start of an absolute path. From-SVN: r62834 --- libjava/ChangeLog | 7 +++++++ libjava/gnu/gcj/runtime/NameFinder.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index a12774e21de..9779c71bc9a 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2002-02-13 Ranjit Mathew + + * gnu/gcj/runtime/NameFinder.java (createStackTraceElement): Use + lastIndexOf( ) instead of indexOf( ) to find the colon before + the line number, because Win32 file names might contain a + drive letter and a colon at the start of an absolute path. + 2003-02-13 Michael Koch * gnu/java/nio/natSocketChannelImpl.cc diff --git a/libjava/gnu/gcj/runtime/NameFinder.java b/libjava/gnu/gcj/runtime/NameFinder.java index 1d729d252ac..4089411e84b 100644 --- a/libjava/gnu/gcj/runtime/NameFinder.java +++ b/libjava/gnu/gcj/runtime/NameFinder.java @@ -371,7 +371,7 @@ public class NameFinder int line = -1; if (fileName != null) { - int colon = file.indexOf(':'); + int colon = file.lastIndexOf(':'); if (colon > 0) { fileName = file.substring(0, colon);