NameFinder.java (createStackTraceElement): Use lastIndexOf( ) instead of indexOf...
authorRanjit Mathew <rmathew@hotmail.com>
Thu, 13 Feb 2003 09:33:18 +0000 (09:33 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Thu, 13 Feb 2003 09:33:18 +0000 (09:33 +0000)
2002-02-13  Ranjit Mathew  <rmathew@hotmail.com>

       * 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
libjava/gnu/gcj/runtime/NameFinder.java

index a12774e21def3f43dadf2936bd5da3ffa8318496..9779c71bc9ac5e2b5dfa96304f032a9f7fec12b2 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-13  Ranjit Mathew  <rmathew@hotmail.com>
+
+       * 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  <konqueror@gmx.de>
 
        * gnu/java/nio/natSocketChannelImpl.cc
index 1d729d252accdca0ca1f96dfea00901e6746f89b..4089411e84b72e2519c7a52759acabee3548a006 100644 (file)
@@ -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);