From 75cbb262f596fddadd8dd54566c30fb2689a1b4d Mon Sep 17 00:00:00 2001 From: dmose Date: Mon, 21 Jul 2003 17:40:36 +0000 Subject: [PATCH] Fix bug where some versions of jikes were producing error messages that we didn't know how to handle because we weren't expecting full paths --- app/PdeCompiler.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/PdeCompiler.java b/app/PdeCompiler.java index dbca35fc5..198e70cb6 100644 --- a/app/PdeCompiler.java +++ b/app/PdeCompiler.java @@ -82,11 +82,18 @@ public class PdeCompiler implements PdeMessageConsumer{ // we need to replace any platform-specific separator characters before // attemping to compare // - String fullTempFilename = buildPath.replace(File.separatorChar, '/') + String partialTempPath = buildPath.replace(File.separatorChar, '/') + "/" + className + ".java"; - if (s.indexOf(fullTempFilename) == 0) { - String s1 = s.substring(fullTempFilename.length() + 1); + // if the partial temp path appears in the error message... + // + int partialStartIndex = s.indexOf(partialTempPath); + if (partialStartIndex != -1) { + + // skip past the path and parse the int after the first colon + // + String s1 = s.substring(partialStartIndex + partialTempPath.length() + + 1); int colon = s1.indexOf(':'); int lineNumber = Integer.parseInt(s1.substring(0, colon)); //System.out.println("pde / line number: " + lineNumber);