diff options
| author | Anirban Chakraborty | 2013-09-04 06:22:52 +0000 |
|---|---|---|
| committer | Jayaprakash Arthanareeswaran | 2013-09-04 06:22:52 +0000 |
| commit | b40a58ab0876d24632a275ef1be808b26bd863a5 (patch) | |
| tree | fb79b51212bead8a5d2c46aed6555e4c5fe00e06 | |
| parent | e097bd9e8b95f2f5601006e28238301c69bf5baf (diff) | |
| download | eclipse.jdt.core-b40a58ab0876d24632a275ef1be808b26bd863a5.tar.gz eclipse.jdt.core-b40a58ab0876d24632a275ef1be808b26bd863a5.tar.xz eclipse.jdt.core-b40a58ab0876d24632a275ef1be808b26bd863a5.zip | |
Fix for bug 415860 - [1.8][compiler] EclipseCompiler should not hard
code compliance level
Signed-off-by: Anirban Chakraborty <anchakrk@in.ibm.com>
| -rw-r--r-- | org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java index 52ace6f5ec..01063d8163 100644 --- a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java +++ b/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java @@ -1,10 +1,14 @@ /******************************************************************************* - * Copyright (c) 2006, 2010 IBM Corporation and others. + * Copyright (c) 2006, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * + * This is an implementation of an early-draft specification developed under the Java + * Community Process (JCP) and is made available for testing and evaluation purposes + * only. The code is not compatible with any specification of the JCP. + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -46,9 +50,9 @@ public class EclipseCompiler implements JavaCompiler { private static Set<SourceVersion> SupportedSourceVersions; static { // Eclipse compiler supports all possible versions from version 0 to - // version 6 + // latest supported version // we don't care about the order - EnumSet<SourceVersion> enumSet = EnumSet.range(SourceVersion.RELEASE_0, SourceVersion.RELEASE_6); + EnumSet<SourceVersion> enumSet = EnumSet.range(SourceVersion.RELEASE_0, SourceVersion.latestSupported()); // we don't want anybody to modify this list EclipseCompiler.SupportedSourceVersions = Collections.unmodifiableSet(enumSet); } @@ -115,9 +119,9 @@ public class EclipseCompiler implements JavaCompiler { eclipseCompiler2.fileManager = this.getStandardFileManager(someDiagnosticListener, null, null); } - eclipseCompiler2.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6); - eclipseCompiler2.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); - eclipseCompiler2.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6); + eclipseCompiler2.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8); + eclipseCompiler2.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8); + eclipseCompiler2.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8); ArrayList<String> allOptions = new ArrayList<String>(); if (options != null) { |
