Bug 290470 - [JSR199][compiler] JDT compiler not jsr199 compatible.
Summary: [JSR199][compiler] JDT compiler not jsr199 compatible.
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC All
: P3 major with 1 vote (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-24 20:43 EDT by Loukili CLA
Modified: 2009-10-27 09:40 EDT (History)
2 users (show)

See Also:


Attachments
Proposed fix + regression test (9.25 KB, patch)
2009-09-29 14:30 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.