Bug 148523 - [batch] Batch compiler output contains extra linebreak before line position
Summary: [batch] Batch compiler output contains extra linebreak before line position
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Maxime Daniel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-24 04:26 EDT by Philipe Mulet CLA
Modified: 2006-09-12 06:29 EDT (History)
0 users

See Also:


Attachments
Proposed patch (19.10 KB, patch)
2006-06-24 05:21 EDT, Philipe Mulet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2006-06-24 04:26:28 EDT
Build 3.2RC7
Comment 1 Philipe Mulet CLA 2006-06-24 04:28:18 EDT
When writing errors to console, entires look like:

----------
11. ERROR in X.java
(at line 10)
        X<String> xs = foo(x).identity();
                       ^^^
The method foo(X) is undefined for the type X
----------

Observe that " (at line 10)" used to be located at end of previous line.
An extraneous linebreak got inserted.
Seems like this was broken already in 3.1.
Comment 2 Philipe Mulet CLA 2006-06-24 04:28:41 EDT
### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
retrieving revision 1.257
diff -u -r1.257 Main.java
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Jun 2006 17:04:31 -0000 1.257
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 23 Jun 2006 08:33:24 -0000
@@ -535,7 +535,7 @@
     if (localErrorCount == 0) {
      this.printlnErr("----------"); //$NON-NLS-1$
     }
-    this.printlnErr(problem.isError() ?
+    this.printErr(problem.isError() ?
       Main.bind(
         "requestor.error", //$NON-NLS-1$
         Integer.toString(globalErrorCount),
@@ -546,7 +546,7 @@
           new String(problem.getOriginatingFileName())));
     try {
      final String errorReportSource = ((DefaultProblem) problem).errorReportSource(unitSource);
-     if (errorReportSource.length() != 0) this.printlnErr(errorReportSource);
+     this.printlnErr(errorReportSource);
      this.printlnErr(problem.getMessage());
     } catch (Exception e) {
      this.printlnErr(Main.bind(
Comment 3 Philipe Mulet CLA 2006-06-24 04:46:17 EDT
pls backport to 3.2.1
Comment 4 Philipe Mulet CLA 2006-06-24 05:21:58 EDT
Created attachment 45240 [details]
Proposed patch
Comment 5 Maxime Daniel CLA 2006-06-26 09:13:19 EDT
Released for 3.3 M1
Released for 3.2.1
Verifier please run ecj on a faulty file or else watch runNegativeTest calls into BatchCompilerTest.
Comment 6 Frederic Fusier CLA 2006-08-07 12:47:05 EDT
Verified for 3.3 M1 using build I20060807-0010.
Comment 7 Frederic Fusier CLA 2006-09-12 06:29:16 EDT
Verified for 3.2.1 using ecj_3.2.1.jar from http://www.eclipse.org/jdt/core/r3.2/index.php#UPDATES