]> source.dussan.org Git - aspectj.git/commitdiff
Patch for 81846: Submitted by Attila Lendvai. Seems to just be hiding a problem...
authoraclement <aclement>
Wed, 1 Jun 2005 16:12:58 +0000 (16:12 +0000)
committeraclement <aclement>
Wed, 1 Jun 2005 16:12:58 +0000 (16:12 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/EclipseAdapterUtils.java

index e2c29624504721cb86f11c444cf8a302b69ded1d..0b0deae5068c655bd6a372669050ffd97b37de31 100644 (file)
@@ -80,8 +80,8 @@ public class EclipseAdapterUtils {
         char c;
         //remove all SPACE and TAB that begin the error message...
         int trimLeftIndex = 0;
-        while (((c = extract[trimLeftIndex++]) == TAB) || (c == SPACE)) {
-        };
+        while (   (((c = extract[trimLeftIndex++]) == TAB) || (c == SPACE)) && trimLeftIndex<extract.length   ) { };
+               if (trimLeftIndex>=extract.length) return new String(extract)+"\n";
         System.arraycopy(
             extract,
             trimLeftIndex - 1,