Bug 290470

Summary: [JSR199][compiler] JDT compiler not jsr199 compatible.
Product: [Eclipse Project] JDT Reporter: Loukili <mlo>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: amj87.iitr, Olivier_Thomann
Version: 3.6   
Target Milestone: 3.6 M3   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed fix + regression test none

Description Loukili CLA 2009-09-24 20:43:59 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14
Build Identifier: 

When fetching DiagnosticListener, I found no diagnostics. It's due to:

DefaultProblemFactory defines two methods. the compiler api is using the second.

But the Class EclipseCompilerImpl.getProblemFactory implements the first one.

public CategorizedProblem createProblem(
	char[] originatingFileName,
	int problemId,
	String[] problemArguments,
	String[] messageArguments,
	int severity,
	int startPosition,
	int endPosition,
	int lineNumber,
	int columnNumber) {

	return new DefaultProblem(
		originatingFileName,
		this.getLocalizedMessage(problemId, messageArguments),
		problemId,
		problemArguments,
		severity,
		startPosition,
		endPosition,
		lineNumber,
		columnNumber);
}
public CategorizedProblem createProblem(
	char[] originatingFileName,
	int problemId,
	String[] problemArguments,
	int elaborationId,
	String[] messageArguments,
	int severity,
	int startPosition,
	int endPosition,
	int lineNumber,
	int columnNumber) {
	return new DefaultProblem(
		originatingFileName,
		this.getLocalizedMessage(problemId, elaborationId, messageArguments),
		problemId,
		problemArguments,
		severity,
		startPosition,
		endPosition,
		lineNumber,
		columnNumber);
}

Reproducible: Always

Steps to Reproduce:
1. Just compile code using a DiagnosticListener
2.
3.
Comment 1 Olivier Thomann CLA 2009-09-29 14:30:44 EDT
Created attachment 148357 [details]
Proposed fix + regression test
Comment 2 Olivier Thomann CLA 2009-09-29 14:31:35 EDT
Released for 3.6M3.
Regression test added in:
org.eclipse.jdt.compiler.tool.tests.CompilerToolTests#testCompilerOneClassWithEclipseCompiler5
Comment 3 Ayushman Jain CLA 2009-10-27 09:01:22 EDT
Verified for 3.6M3 through code inspection.