Bug 168910 - Should default compliance be 6.0 in JSR199 batch compilation?
Summary: Should default compliance be 6.0 in JSR199 batch compilation?
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-21 21:14 EST by Walter Harley CLA
Modified: 2007-05-07 11:54 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Harley CLA 2006-12-21 21:14:53 EST
It is now possible to launch the compiler via the javax.tools.JavaCompiler interface.  This corresponds to functionality in javac version 6.0.

I think that when the compiler is launched this way, we should default to the "-6.0" option.  This interface is only available on a 1.6 JVM anyway, and I do not think that anyone launching a compiler this way is going to expect it to default to an earlier compliance level.
Comment 1 Olivier Thomann CLA 2007-02-15 13:33:44 EST
The default compliance of the tool compiler is 1.6.
So you are right, we should also set the default to be 1.6.
This could of course be overridden with the options passed to the compilation unit task.
Comment 2 Olivier Thomann CLA 2007-02-15 14:14:46 EST
Released for 3.3M6.
Added check in test org.eclipse.jdt.compiler.tool.tests.CompilerToolTests#testCompilerOneClassWithEclipseCompiler2
Comment 3 Maxime Daniel CLA 2007-03-21 06:23:27 EDT
Verified for 3.3 M6 using v_744.

I could see by stepping in the code that we set the default to 1.6, hence I consider the bug as verified.

Yet, I could not get how the test is supposed to check that. More precisely, I modified it to explicitly set the compliance level to 1.5 (added options.add("-1.5"); at CompilerToolTests#434), and I got no error. Could you explain please?

The test is also flushing lines in the console when performing as expected. I suggest you remove that behavior.
Comment 4 Olivier Thomann CLA 2007-05-07 11:54:45 EDT
Regression test has been improved.