Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 415860 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.jdt.compiler.apt.tests/resources/targets/dispatch/X.java (-1 / +12 lines)
Lines 1-12 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2007-2009 BEA Systems, Inc. and others
2
 * Copyright (c) 2007-2013 BEA Systems, Inc. and others
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 * 
8
 * This is an implementation of an early-draft specification developed under the Java
9
 * Community Process (JCP) and is made available for testing and evaluation purposes
10
 * only. The code is not compatible with any specification of the JCP.
11
 * 
8
 * Contributors:
12
 * Contributors:
9
 *     wharley@bea.com - initial API and implementation
13
 *     wharley@bea.com - initial API and implementation
14
 *     IBM Contribution :
15
 *     		Bug 415860 - [1.8][compiler] EclipseCompiler should not hard code compliance level
10
 *******************************************************************************/
16
 *******************************************************************************/
11
import p.Y;
17
import p.Y;
12
import p.Z;
18
import p.Z;
Lines 16-19 Link Here
16
		System.out.println(new Y());
22
		System.out.println(new Y());
17
		System.out.println(new Z());
23
		System.out.println(new Z());
18
	}
24
	}
25
}
26
interface I {
27
	default String defaultMethod () {
28
		return null;
29
	}
19
}
30
}
(-)a/org.eclipse.jdt.compiler.tool/src/org/eclipse/jdt/internal/compiler/tool/EclipseCompiler.java (-6 / +10 lines)
Lines 1-10 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2010 IBM Corporation and others.
2
 * Copyright (c) 2006, 2013 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
7
 *
8
 * This is an implementation of an early-draft specification developed under the Java
9
 * Community Process (JCP) and is made available for testing and evaluation purposes
10
 * only. The code is not compatible with any specification of the JCP.
11
 * 
8
 * Contributors:
12
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
13
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
14
 *******************************************************************************/
Lines 46-54 Link Here
46
	private static Set<SourceVersion> SupportedSourceVersions;
50
	private static Set<SourceVersion> SupportedSourceVersions;
47
	static {
51
	static {
48
		// Eclipse compiler supports all possible versions from version 0 to
52
		// Eclipse compiler supports all possible versions from version 0 to
49
		// version 6
53
		// latest supported version
50
		// we don't care about the order
54
		// we don't care about the order
51
		EnumSet<SourceVersion> enumSet = EnumSet.range(SourceVersion.RELEASE_0, SourceVersion.RELEASE_6);
55
		EnumSet<SourceVersion> enumSet = EnumSet.range(SourceVersion.RELEASE_0, SourceVersion.latestSupported());
52
		// we don't want anybody to modify this list
56
		// we don't want anybody to modify this list
53
		EclipseCompiler.SupportedSourceVersions = Collections.unmodifiableSet(enumSet);
57
		EclipseCompiler.SupportedSourceVersions = Collections.unmodifiableSet(enumSet);
54
	}
58
	}
Lines 115-123 Link Here
115
			eclipseCompiler2.fileManager = this.getStandardFileManager(someDiagnosticListener, null, null);
119
			eclipseCompiler2.fileManager = this.getStandardFileManager(someDiagnosticListener, null, null);
116
		}
120
		}
117
121
118
		eclipseCompiler2.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6);
122
		eclipseCompiler2.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
119
		eclipseCompiler2.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
123
		eclipseCompiler2.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
120
		eclipseCompiler2.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
124
		eclipseCompiler2.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
121
125
122
		ArrayList<String> allOptions = new ArrayList<String>();
126
		ArrayList<String> allOptions = new ArrayList<String>();
123
		if (options != null) {
127
		if (options != null) {

Return to bug 415860