Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2016-09-08 15:22:10 +0000
committerMarkus Keller2016-09-08 16:14:57 +0000
commitb4982749a45af9f2fcf06a18f401056b55ecb7f8 (patch)
treee09051100750b708fde10ec1cfd144a92aa26cc6
parente157b21bb74eaf6b41c3411a9206ec3f8b5f29a2 (diff)
parent939cdd38674f6d8def82d09c3784113f9d5616d7 (diff)
downloadeclipse.jdt.core-b4982749a45af9f2fcf06a18f401056b55ecb7f8.tar.gz
eclipse.jdt.core-b4982749a45af9f2fcf06a18f401056b55ecb7f8.tar.xz
eclipse.jdt.core-b4982749a45af9f2fcf06a18f401056b55ecb7f8.zip
Merge remote-tracking branch 'origin/master' into BETA_JAVA9
Conflicts: org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java -> resurrected testBug489674 that was lost in a previous merge org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
-rw-r--r--org.eclipse.jdt.apt.core/.classpath2
-rw-r--r--org.eclipse.jdt.apt.core/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.jdt.apt.core/pom.xml2
-rw-r--r--org.eclipse.jdt.apt.pluggable.core/.classpath2
-rw-r--r--org.eclipse.jdt.apt.pluggable.core/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.jdt.apt.pluggable.core/pom.xml2
-rw-r--r--org.eclipse.jdt.apt.pluggable.tests/.classpath2
-rw-r--r--org.eclipse.jdt.apt.pluggable.tests/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.apt.pluggable.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.apt.tests/.classpath2
-rw-r--r--org.eclipse.jdt.apt.tests/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.apt.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.apt.ui/.classpath2
-rw-r--r--org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.jdt.apt.ui/pom.xml2
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/.classpath2
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.compiler.apt.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.compiler.apt/.classpath2
-rw-r--r--org.eclipse.jdt.compiler.apt/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.jdt.compiler.apt/pom.xml2
-rw-r--r--org.eclipse.jdt.compiler.tool.tests/.classpath2
-rw-r--r--org.eclipse.jdt.compiler.tool.tests/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.compiler.tool.tests/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.compiler.tool/.classpath2
-rw-r--r--org.eclipse.jdt.compiler.tool/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.compiler.tool/META-INF/MANIFEST.MF4
-rw-r--r--org.eclipse.jdt.compiler.tool/pom.xml2
-rw-r--r--org.eclipse.jdt.core.tests.builder/.classpath2
-rw-r--r--org.eclipse.jdt.core.tests.builder/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.core.tests.builder/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.core.tests.compiler/.classpath2
-rw-r--r--org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest18.java146
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java79
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java27
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java167
-rw-r--r--org.eclipse.jdt.core.tests.model/.classpath2
-rw-r--r--org.eclipse.jdt.core.tests.model/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java108
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExclusionPatternsTests.java6
-rw-r--r--org.eclipse.jdt.core.tests.performance/.classpath2
-rw-r--r--org.eclipse.jdt.core.tests.performance/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.core.tests.performance/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java1
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java3
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java3
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java6
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java8
-rw-r--r--org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java30
-rw-r--r--org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapExecutor.java9
-rw-r--r--org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java17
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java43
61 files changed, 695 insertions, 112 deletions
diff --git a/org.eclipse.jdt.apt.core/.classpath b/org.eclipse.jdt.apt.core/.classpath
index 3bc247511f..22f30643cb 100644
--- a/org.eclipse.jdt.apt.core/.classpath
+++ b/org.eclipse.jdt.apt.core/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.apt.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.apt.core/.settings/org.eclipse.jdt.core.prefs
index 0b350422bb..473ae17412 100644
--- a/org.eclipse.jdt.apt.core/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.apt.core/.settings/org.eclipse.jdt.core.prefs
@@ -9,9 +9,9 @@ org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -74,6 +74,6 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF
index ebafcdf5d7..ea7275542a 100644
--- a/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.apt.core; singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.5.0.qualifier
Bundle-Localization: plugin
Export-Package: com.sun.mirror.apt,
com.sun.mirror.declaration,
@@ -24,6 +24,6 @@ Require-Bundle: org.eclipse.jdt.core;bundle-version="[3.6.0,4.0.0)",
org.apache.ant;bundle-version="1.6.5"
Bundle-Activator: org.eclipse.jdt.apt.core.internal.AptPlugin
Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Import-Package: com.sun.mirror.type
diff --git a/org.eclipse.jdt.apt.core/pom.xml b/org.eclipse.jdt.apt.core/pom.xml
index 2fb3a584ac..e09b069413 100644
--- a/org.eclipse.jdt.apt.core/pom.xml
+++ b/org.eclipse.jdt.apt.core/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.apt.core</artifactId>
- <version>3.4.100-SNAPSHOT</version>
+ <version>3.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.jdt.apt.pluggable.core/.classpath b/org.eclipse.jdt.apt.pluggable.core/.classpath
index 3bc247511f..22f30643cb 100644
--- a/org.eclipse.jdt.apt.pluggable.core/.classpath
+++ b/org.eclipse.jdt.apt.pluggable.core/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.apt.pluggable.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.apt.pluggable.core/.settings/org.eclipse.jdt.core.prefs
index 3448e76153..8d105527c1 100644
--- a/org.eclipse.jdt.apt.pluggable.core/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.apt.pluggable.core/.settings/org.eclipse.jdt.core.prefs
@@ -8,12 +8,12 @@ org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.uninternedIdentityComparison=enabled
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF
index 220eb2ed40..e09fc4457b 100644
--- a/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.apt.pluggable.core;singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.2.0.qualifier
Bundle-Activator: org.eclipse.jdt.internal.apt.pluggable.core.Apt6Plugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime,
@@ -18,5 +18,5 @@ Import-Package: org.eclipse.jdt.internal.compiler.tool,
org.eclipse.jdt.internal.compiler.apt.dispatch,
org.eclipse.jdt.internal.compiler.apt.model,
org.eclipse.jdt.internal.compiler.apt.util
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/org.eclipse.jdt.apt.pluggable.core/pom.xml b/org.eclipse.jdt.apt.pluggable.core/pom.xml
index 67866cbe42..228fe44621 100644
--- a/org.eclipse.jdt.apt.pluggable.core/pom.xml
+++ b/org.eclipse.jdt.apt.pluggable.core/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.apt.pluggable.core</artifactId>
- <version>1.1.100-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.jdt.apt.pluggable.tests/.classpath b/org.eclipse.jdt.apt.pluggable.tests/.classpath
index 3bc247511f..22f30643cb 100644
--- a/org.eclipse.jdt.apt.pluggable.tests/.classpath
+++ b/org.eclipse.jdt.apt.pluggable.tests/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.apt.pluggable.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.apt.pluggable.tests/.settings/org.eclipse.jdt.core.prefs
index 5a1b8a66c6..c8258ec3bb 100644
--- a/org.eclipse.jdt.apt.pluggable.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.apt.pluggable.tests/.settings/org.eclipse.jdt.core.prefs
@@ -15,9 +15,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -106,6 +106,6 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.apt.pluggable.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.apt.pluggable.tests/META-INF/MANIFEST.MF
index 0e57b44ee0..c3874e9342 100644
--- a/org.eclipse.jdt.apt.pluggable.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.apt.pluggable.tests/META-INF/MANIFEST.MF
@@ -19,5 +19,5 @@ Require-Bundle: org.junit,
org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
diff --git a/org.eclipse.jdt.apt.tests/.classpath b/org.eclipse.jdt.apt.tests/.classpath
index e576c56c95..e0d4fb53ad 100644
--- a/org.eclipse.jdt.apt.tests/.classpath
+++ b/org.eclipse.jdt.apt.tests/.classpath
@@ -4,7 +4,7 @@
<classpathentry kind="src" output="bin-resources" path="src-resources"/>
<classpathentry kind="src" output="bin-ext" path="src-ext"/>
<classpathentry kind="src" output="bin-annotations" path="src-annotations"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.apt.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.apt.tests/.settings/org.eclipse.jdt.core.prefs
index 5c65da1c6c..eeb1622e86 100644
--- a/org.eclipse.jdt.apt.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.apt.tests/.settings/org.eclipse.jdt.core.prefs
@@ -9,9 +9,9 @@ org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -20,6 +20,6 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.apt.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.apt.tests/META-INF/MANIFEST.MF
index d23749d316..b73d6eb98c 100644
--- a/org.eclipse.jdt.apt.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.apt.tests/META-INF/MANIFEST.MF
@@ -43,6 +43,6 @@ Require-Bundle: org.junit,
org.eclipse.jdt.core.tests.binaries;bundle-version="1.0.0",
org.eclipse.pde.core
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: %providerName
Eclipse-BundleShape: dir
diff --git a/org.eclipse.jdt.apt.ui/.classpath b/org.eclipse.jdt.apt.ui/.classpath
index 3bc247511f..22f30643cb 100644
--- a/org.eclipse.jdt.apt.ui/.classpath
+++ b/org.eclipse.jdt.apt.ui/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs
index 57998eab5e..d2f713d0ec 100644
--- a/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs
@@ -15,9 +15,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -120,6 +120,6 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF
index 8109b9a70d..d784cf15b7 100644
--- a/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.apt.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.apt.ui; singleton:=true
-Bundle-Version: 3.4.100.qualifier
+Bundle-Version: 3.5.0.qualifier
Bundle-Activator: org.eclipse.jdt.apt.ui.internal.AptUIPlugin
Bundle-Localization: plugin
Require-Bundle: org.eclipse.jdt.apt.core;bundle-version="[3.2.0,4.0.0)",
@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.jdt.apt.core;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.jdt.apt.ui.internal;x-internal:=true,
org.eclipse.jdt.apt.ui.internal.preferences;x-internal:=true,
org.eclipse.jdt.apt.ui.internal.util;x-internal:=true
diff --git a/org.eclipse.jdt.apt.ui/pom.xml b/org.eclipse.jdt.apt.ui/pom.xml
index 995b2a545d..75f0bde881 100644
--- a/org.eclipse.jdt.apt.ui/pom.xml
+++ b/org.eclipse.jdt.apt.ui/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.apt.ui</artifactId>
- <version>3.4.100-SNAPSHOT</version>
+ <version>3.5.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.jdt.compiler.apt.tests/.classpath b/org.eclipse.jdt.compiler.apt.tests/.classpath
index 4fcfc9913f..6d510c6323 100644
--- a/org.eclipse.jdt.compiler.apt.tests/.classpath
+++ b/org.eclipse.jdt.compiler.apt.tests/.classpath
@@ -5,6 +5,6 @@
<classpathentry kind="src" output="binprocessors8" path="processors8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="rtstubs18.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.compiler.apt.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.compiler.apt.tests/.settings/org.eclipse.jdt.core.prefs
index 6c46806510..47a7607d9f 100644
--- a/org.eclipse.jdt.compiler.apt.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.compiler.apt.tests/.settings/org.eclipse.jdt.core.prefs
@@ -9,9 +9,9 @@ org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -68,6 +68,6 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.compiler.apt.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.compiler.apt.tests/META-INF/MANIFEST.MF
index b09a8603df..e078971bf2 100644
--- a/org.eclipse.jdt.compiler.apt.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.compiler.apt.tests/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.jdt.compiler.apt.tests;singleton:=true
Bundle-Version: 1.1.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.junit,
org.eclipse.jdt.core;bundle-version="3.5.0",
org.eclipse.core.resources,
diff --git a/org.eclipse.jdt.compiler.apt/.classpath b/org.eclipse.jdt.compiler.apt/.classpath
index 3bc247511f..22f30643cb 100644
--- a/org.eclipse.jdt.compiler.apt/.classpath
+++ b/org.eclipse.jdt.compiler.apt/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.compiler.apt/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.compiler.apt/.settings/org.eclipse.jdt.core.prefs
index 5d0b000280..f491f034c9 100644
--- a/org.eclipse.jdt.compiler.apt/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.compiler.apt/.settings/org.eclipse.jdt.core.prefs
@@ -15,9 +15,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -108,6 +108,6 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF b/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF
index 23f28eeea7..7889ff9f42 100644
--- a/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %fragmentName
Bundle-SymbolicName: org.eclipse.jdt.compiler.apt;singleton:=true
-Bundle-Version: 1.2.100.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-Version: 1.3.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.jdt.core;bundle-version="[3.5.0,4.0.0)"
Bundle-Localization: compiler_apt_fragment
diff --git a/org.eclipse.jdt.compiler.apt/pom.xml b/org.eclipse.jdt.compiler.apt/pom.xml
index 08fd3d2cd3..e8b2e30672 100644
--- a/org.eclipse.jdt.compiler.apt/pom.xml
+++ b/org.eclipse.jdt.compiler.apt/pom.xml
@@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
- <version>1.2.100-SNAPSHOT</version>
+ <version>1.3.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/org.eclipse.jdt.compiler.tool.tests/.classpath b/org.eclipse.jdt.compiler.tool.tests/.classpath
index b277a8ac87..01836c4842 100644
--- a/org.eclipse.jdt.compiler.tool.tests/.classpath
+++ b/org.eclipse.jdt.compiler.tool.tests/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.compiler.tool.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.compiler.tool.tests/.settings/org.eclipse.jdt.core.prefs
index 492694bdf5..1bcbf0a83d 100644
--- a/org.eclipse.jdt.compiler.tool.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.compiler.tool.tests/.settings/org.eclipse.jdt.core.prefs
@@ -9,9 +9,9 @@ org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -68,6 +68,6 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=di
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.compiler.tool.tests/META-INF/MANIFEST.MF b/org.eclipse.jdt.compiler.tool.tests/META-INF/MANIFEST.MF
index 1987c11bbb..78af434015 100644
--- a/org.eclipse.jdt.compiler.tool.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.compiler.tool.tests/META-INF/MANIFEST.MF
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.jdt.compiler.tool.tests
Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.jdt.core;bundle-version="3.2.2",
org.junit,
org.eclipse.test.performance,
diff --git a/org.eclipse.jdt.compiler.tool/.classpath b/org.eclipse.jdt.compiler.tool/.classpath
index b277a8ac87..01836c4842 100644
--- a/org.eclipse.jdt.compiler.tool/.classpath
+++ b/org.eclipse.jdt.compiler.tool/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.compiler.tool/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.compiler.tool/.settings/org.eclipse.jdt.core.prefs
index dc81c8e33b..66adad6cba 100644
--- a/org.eclipse.jdt.compiler.tool/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.compiler.tool/.settings/org.eclipse.jdt.core.prefs
@@ -15,9 +15,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -120,6 +120,6 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.compiler.tool/META-INF/MANIFEST.MF b/org.eclipse.jdt.compiler.tool/META-INF/MANIFEST.MF
index 5321934601..e689b6de91 100644
--- a/org.eclipse.jdt.compiler.tool/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.compiler.tool/META-INF/MANIFEST.MF
@@ -2,10 +2,10 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %fragmentName
Bundle-SymbolicName: org.eclipse.jdt.compiler.tool;singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.2.0.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: compiler_tool_fragment
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: META-INF.services,
org.eclipse.jdt.internal.compiler.tool;x-internal:=true
Fragment-Host: org.eclipse.jdt.core;bundle-version="[3.3.0,4.0.0)"
diff --git a/org.eclipse.jdt.compiler.tool/pom.xml b/org.eclipse.jdt.compiler.tool/pom.xml
index d2765f87d9..5eb9c00781 100644
--- a/org.eclipse.jdt.compiler.tool/pom.xml
+++ b/org.eclipse.jdt.compiler.tool/pom.xml
@@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.tool</artifactId>
- <version>1.1.100-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/org.eclipse.jdt.core.tests.builder/.classpath b/org.eclipse.jdt.core.tests.builder/.classpath
index b277a8ac87..01836c4842 100644
--- a/org.eclipse.jdt.core.tests.builder/.classpath
+++ b/org.eclipse.jdt.core.tests.builder/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.builder/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.builder/.settings/org.eclipse.jdt.core.prefs
index 858647c487..30f420b20f 100644
--- a/org.eclipse.jdt.core.tests.builder/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.core.tests.builder/.settings/org.eclipse.jdt.core.prefs
@@ -9,9 +9,9 @@ org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -94,6 +94,6 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.core.tests.builder/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.builder/META-INF/MANIFEST.MF
index 05ca8613a6..3412b6cbd0 100644
--- a/org.eclipse.jdt.core.tests.builder/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.builder/META-INF/MANIFEST.MF
@@ -14,5 +14,5 @@ Require-Bundle: org.junit;bundle-version="3.8.1",
org.eclipse.test.performance;bundle-version="[3.1.0,4.0.0)",
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
diff --git a/org.eclipse.jdt.core.tests.compiler/.classpath b/org.eclipse.jdt.core.tests.compiler/.classpath
index b277a8ac87..01836c4842 100644
--- a/org.eclipse.jdt.core.tests.compiler/.classpath
+++ b/org.eclipse.jdt.core.tests.compiler/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
index 1c33923691..9426fc4d4d 100644
--- a/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.core.tests.compiler/.settings/org.eclipse.jdt.core.prefs
@@ -15,9 +15,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -120,6 +120,6 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
index 75d4962a83..5868614131 100644
--- a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
@@ -23,7 +23,7 @@ Require-Bundle: org.junit;bundle-version="3.8.1",
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional
Import-Package: org.eclipse.jdt.internal.compiler.apt.dispatch
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
Bundle-Activator: org.eclipse.jdt.core.tests.compiler.Activator
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest18.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest18.java
index 501be495d1..01472ffab7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest18.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SelectionParserTest18.java
@@ -17,7 +17,7 @@ import junit.framework.Test;
public class SelectionParserTest18 extends AbstractSelectionTest {
static {
// TESTS_NUMBERS = new int[] { 53 };
- TESTS_NAMES = new String[] { "test495912" };
+// TESTS_NAMES = new String[] { "test495912" };
}
public static Test suite() {
return buildMinimalComplianceTestSuite(SelectionParserTest18.class, F_1_8);
@@ -309,4 +309,148 @@ public void test495912() {
expectedReplacedSource,
testName);
}
+public void test495912a() {
+ String string =
+ "package xy;\n" +
+ "public class Test {\n" +
+ " {\n" +
+ " Runnable r = () -> {\n" +
+ " Integer i= 1;\n" +
+ " byte b= i.byteValue();\n" +
+ " if (true) {\n" +
+ " if (false) {\n" +
+ " }\n" +
+ " }\n" +
+ " for (int i1 = 0; i1 < 42; i1++) {\n" +
+ " }\n" +
+ " };\n" +
+ " }\n" +
+ " public void foo(Runnable r) {\n" +
+ " }\n" +
+ "}";
+
+ String expectedCompletionNodeToString = "<SelectOnMessageSend:i.byteValue()>";
+
+ String completionIdentifier = "byteValue";
+ String expectedUnitDisplayString =
+ "package xy;\n" +
+ "public class Test {\n" +
+ " {\n" +
+ " Runnable r = () -> {\n" +
+ " Integer i;\n" +
+ " byte b = <SelectOnMessageSend:i.byteValue()>;\n" +
+ " if (true)\n" +
+ " {\n" +
+ " if (false)\n" +
+ " {\n" +
+ " }\n" +
+ " }\n" +
+ " for (int i1;; (i1 < 42); i1 ++) \n" +
+ " {\n" +
+ " }\n" +
+ " };\n" +
+ " }\n" +
+ " public Test() {\n" +
+ " }\n" +
+ " public void foo(Runnable r) {\n" +
+ " }\n" +
+ "}\n";
+ String expectedReplacedSource = "i.byteValue()";
+ String testName = "<select>";
+
+ int selectionStart = string.indexOf("byteValue");
+ int selectionEnd = selectionStart + completionIdentifier.length() - 1;
+
+ this.checkMethodParse(
+ string.toCharArray(),
+ selectionStart,
+ selectionEnd,
+ expectedCompletionNodeToString,
+ expectedUnitDisplayString,
+ completionIdentifier,
+ expectedReplacedSource,
+ testName);
+}
+public void test495912b() {
+ String string =
+ "package xy;\n" +
+ "import org.eclipse.e4.ui.internal.workbench.PartServiceImpl;\n" +
+ "import org.eclipse.e4.ui.model.application.ui.basic.MPart;\n" +
+ "import org.eclipse.swt.widgets.Table;\n" +
+ "import org.eclipse.ui.IWorkbenchWindow;\n" +
+ "public abstract class CycleViewHandler extends CycleBaseHandler {\n" +
+ " @Override\n" +
+ " protected void addItems(Table table, WorkbenchPage page) {\n" +
+ " List<MPart> parts = null;\n" +
+ " parts.stream().sorted((firstPart, secondPart) -> {\n" +
+ " Long firstPartActivationTime = (Long) firstPart.getTransientData()\n" +
+ " .getOrDefault(PartServiceImpl.PART_ACTIVATION_TIME, Long.MIN_VALUE);\n" +
+ " Long secondPartActivationTime = (Long) secondPart.getTransientData()\n" +
+ " .getOrDefault(PartServiceImpl.PART_ACTIVATION_TIME, Long.MIN_VALUE);\n" +
+ " return 0;\n" +
+ " }).forEach(part -> {\n" +
+ " if (true) {\n" +
+ " if (true) {\n" +
+ " }\n" +
+ " } \n" +
+ " else {\n" +
+ " IWorkbenchWindow iwbw = page.getWorkbenchWindow();\n" +
+ " if (true){\n" +
+ " }\n" +
+ " }\n" +
+ " });\n" +
+ " }\n" +
+ "}";
+
+ String expectedSelectionNodeToString = "<SelectOnMessageSend:firstPart.getTransientData()>";
+
+ String selectionIdentifier = "getTransientData";
+ String expectedUnitDisplayString =
+ "package xy;\n" +
+ "import org.eclipse.e4.ui.internal.workbench.PartServiceImpl;\n" +
+ "import org.eclipse.e4.ui.model.application.ui.basic.MPart;\n" +
+ "import org.eclipse.swt.widgets.Table;\n" +
+ "import org.eclipse.ui.IWorkbenchWindow;\n" +
+ "public abstract class CycleViewHandler extends CycleBaseHandler {\n" +
+ " public CycleViewHandler() {\n" +
+ " }\n" +
+ " protected @Override void addItems(Table table, WorkbenchPage page) {\n" +
+ " List<MPart> parts;\n" + // this is the missing part without the fix in RecoveredMethod#add(Block....)
+ " parts.stream().sorted((<no type> firstPart, <no type> secondPart) -> {\n" +
+ " Long firstPartActivationTime = (Long) <SelectOnMessageSend:firstPart.getTransientData()>.getOrDefault(PartServiceImpl.PART_ACTIVATION_TIME, Long.MIN_VALUE);\n" +
+ " Long secondPartActivationTime;\n" +
+ " return 0;\n" +
+ "}).forEach((<no type> part) -> {\n" +
+ " if (true)\n" +
+ " {\n" +
+ " if (true)\n" +
+ " {\n" +
+ " }\n" +
+ " }\n" +
+ " else\n" +
+ " {\n" +
+ " IWorkbenchWindow iwbw;\n" +
+ " if (true)\n" +
+ " {\n" +
+ " }\n" +
+ " }\n" +
+ "});\n" +
+ " }\n" +
+ "}\n";
+ String expectedReplacedSource = "firstPart.getTransientData()";
+ String testName = "<select>";
+
+ int selectionStart = string.indexOf("getTransientData");
+ int selectionEnd = selectionStart + selectionIdentifier.length() - 1;
+
+ this.checkMethodParse(
+ string.toCharArray(),
+ selectionStart,
+ selectionEnd,
+ expectedSelectionNodeToString,
+ expectedUnitDisplayString,
+ selectionIdentifier,
+ expectedReplacedSource,
+ testName);
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
index a3f2cc2f8b..50c2d52393 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
@@ -6216,6 +6216,85 @@ public void testBug499258() {
}
);
}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=500374 Using a method reference to a generic method in a Base class gives me NoSuchMethodError
+public void test500374() {
+ this.runConformTest(
+ new String[] {
+ "client/Client.java",
+ "package client;\n" +
+ "import lib.Sub;\n" +
+ "public class Client {\n" +
+ " public static void main(String[] args) throws Throwable {\n" +
+ " Sub s1 = new Sub();\n" +
+ " doSomething(() -> s1.m());\n" +
+ " doSomething(s1::m);\n" +
+ " }\n" +
+ " interface Aaa {\n" +
+ " Object f() throws Throwable;\n" +
+ " }\n" +
+ " public static void doSomething(Aaa a) throws Throwable {\n" +
+ " System.out.println(\"Done\");\n" +
+ " }\n" +
+ "}\n",
+ "lib/Sub.java",
+ "package lib;\n" +
+ "public class Sub extends Base<Sub> {}",
+ "lib/Base.java",
+ "package lib;\n" +
+ "class Base<T> {\n" +
+ " public T m() {\n" +
+ " System.out.println(\"m\");\n" +
+ " return thisInstance();\n" +
+ " }\n" +
+ " @SuppressWarnings(\"unchecked\")\n" +
+ " T thisInstance() {\n" +
+ " return (T) this;\n" +
+ " }\n" +
+ "}"
+ },
+ "Done\n" +
+ "Done");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=500374 Using a method reference to a generic method in a Base class gives me NoSuchMethodError
+public void test500374a() {
+ this.runConformTest(
+ new String[] {
+ "client/Client.java",
+ "package client;\n" +
+ "import java.lang.invoke.MethodHandle;\n" +
+ "import java.lang.invoke.MethodHandles;\n" +
+ "import java.lang.invoke.MethodType;\n" +
+ "import lib.Sub;\n" +
+ "public class Client {\n" +
+ " public static void main(String[] args) throws Throwable {\n" +
+ " MethodHandle mh = MethodHandles.lookup().findVirtual(Sub.class, \"m\", MethodType.methodType(Object.class));\n" +
+ " doSomething(mh::invoke);\n" +
+ " }\n" +
+ " interface Aaa {\n" +
+ " Object f() throws Throwable;\n" +
+ " }\n" +
+ " public static void doSomething(Aaa a) throws Throwable {\n" +
+ " System.out.println(\"Done\");\n" +
+ " }\n" +
+ "}\n",
+ "lib/Sub.java",
+ "package lib;\n" +
+ "public class Sub extends Base<Sub> {}",
+ "lib/Base.java",
+ "package lib;\n" +
+ "class Base<T> {\n" +
+ " public T m() {\n" +
+ " System.out.println(\"m\");\n" +
+ " return thisInstance();\n" +
+ " }\n" +
+ " @SuppressWarnings(\"unchecked\")\n" +
+ " T thisInstance() {\n" +
+ " return (T) this;\n" +
+ " }\n" +
+ "}"
+ },
+ "Done");
+}
public static Class testClass() {
return LambdaExpressionsTest.class;
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
index 11ae8f04f5..838750ad57 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
@@ -14306,4 +14306,31 @@ public void testBug467776_regression() {
},
compilerOptions);
}
+public void testBug500673() {
+ runNegativeTest(
+ new String[] {
+ "mfi.java",
+ "interface mfi {\n" +
+ " public transient void a(Throwable throwable);\n" +
+ "}\n",
+ "mfa.java",
+ "final class mfa implements mfi {\n" +
+ "}\n"
+ },
+ "----------\n" +
+ "1. ERROR in mfi.java (at line 2)\n" +
+ " public transient void a(Throwable throwable);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^\n" +
+ (this.complianceLevel < ClassFileConstants.JDK1_8
+ ? "Illegal modifier for the interface method a; only public & abstract are permitted\n"
+ : "Illegal modifier for the interface method a; only public, abstract, default, static and strictfp are permitted\n"
+ ) +
+ "----------\n" +
+ "----------\n" +
+ "1. ERROR in mfa.java (at line 1)\n" +
+ " final class mfa implements mfi {\n" +
+ " ^^^\n" +
+ "The type mfa must implement the inherited abstract method mfi.a(Throwable)\n" +
+ "----------\n");
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
index 4711a8ef47..ed31eb5823 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
@@ -12238,6 +12238,101 @@ public void testBug489245() {
"----------\n"
);
}
+public void testBug489674() {
+ Map options = new HashMap<>(getCompilerOptions());
+ options.put(JavaCore.COMPILER_NONNULL_ANNOTATION_SECONDARY_NAMES, "org.foo.NonNull");
+ options.put(JavaCore.COMPILER_NULLABLE_ANNOTATION_SECONDARY_NAMES, "org.foo.Nullable");
+ runConformTest(
+ new String[] {
+ "org/foo/Nullable.java",
+ "package org.foo;\n" +
+ "import java.lang.annotation.*;\n" +
+ "import static java.lang.annotation.ElementType.*;\n" +
+ "@Retention(RetentionPolicy.CLASS)\n" +
+ "@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })\n" +
+ "public @interface Nullable {}\n",
+ "org/foo/NonNull.java",
+ "package org.foo;\n" +
+ "import java.lang.annotation.*;\n" +
+ "import static java.lang.annotation.ElementType.*;\n" +
+ "@Retention(RetentionPolicy.CLASS)\n" +
+ "@Target({ FIELD, METHOD, PARAMETER, LOCAL_VARIABLE })\n" +
+ "public @interface NonNull {}\n",
+ "}"
+ },
+ options);
+ runConformTestWithLibs(
+ new String[] {
+ "with_other_nullable/P1.java",
+ "package with_other_nullable;\n" +
+ "\n" +
+ "import org.foo.Nullable;\n" +
+ "\n" +
+ "public class P1 {\n" +
+ " public static @Nullable String f0() {\n" +
+ " return null;\n" +
+ " }\n" +
+ "\n" +
+ " public static <T> T check(T t) {\n" +
+ " return t;\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ "with_other_nullable/P2.java",
+ "package with_other_nullable;\n" +
+ "\n" +
+ "import org.foo.NonNull;\n" +
+ "\n" +
+ "public class P2 {\n" +
+ " public static void f(@NonNull String s) {\n" +
+ " }\n" +
+ "\n" +
+ " public static <T> T check(T t) {\n" +
+ " return t;\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ },
+ options,
+ ""
+ );
+ runNegativeTestWithLibs(
+ new String[] {
+ "test/Test4.java",
+ "package test;\n" +
+ "\n" +
+ "import org.eclipse.jdt.annotation.NonNullByDefault;\n" +
+ "\n" +
+ "import with_other_nullable.P1;\n" +
+ "import with_other_nullable.P2;\n" +
+ "\n" +
+ "@NonNullByDefault\n" +
+ "public class Test4 {\n" +
+ " void m1(String s) {\n" +
+ " P1.f0().hashCode();\n" +
+ " s = P1.check(s);\n" +
+ " }\n" +
+ " void m2(String s) {\n" +
+ " P2.f(null);\n" +
+ " s = P2.check(s);\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ },
+ options,
+ "----------\n" +
+ "1. ERROR in test\\Test4.java (at line 11)\n" +
+ " P1.f0().hashCode();\n" +
+ " ^^^^^^^\n" +
+ "Potential null pointer access: The method f0() may return null\n" +
+ "----------\n" +
+ "2. ERROR in test\\Test4.java (at line 15)\n" +
+ " P2.f(null);\n" +
+ " ^^^^\n" +
+ "Null type mismatch: required \'String\' but the provided value is null\n" +
+ "----------\n"
+ );
+}
public void testBug492327() {
runConformTestWithLibs(
new String[] {
@@ -12724,4 +12819,76 @@ public void testBug499862c() {
"Potential null pointer access: this expression has type \'T\', a free type variable that may represent a \'@Nullable\' type\n" +
"----------\n");
}
+public void testBug499597simplified() {
+ runConformTestWithLibs(
+ new String[] {
+ "Foo2.java",
+ "import org.eclipse.jdt.annotation.NonNull;\n" +
+ "import org.eclipse.jdt.annotation.NonNullByDefault;\n" +
+ "\n" +
+ "@NonNullByDefault\n" +
+ "class Foo2 {\n" +
+ " static <T> T of(T t) {\n" +
+ " return t;\n" +
+ " }\n" +
+ "\n" +
+ " static String foo() {\n" +
+ " return Foo2.<String>of(\"\"); // <-- warning here\n" +
+ " }\n" +
+ "\n" +
+ " static String bar() {\n" +
+ " return Foo2.<@NonNull String>of(\"\"); // <-- no warning\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ },
+ getCompilerOptions(),
+ ""
+ );
+}
+public void testBug499597original() {
+ runNegativeTestWithLibs(
+ new String[] {
+ "Foo.java",
+ "import static org.eclipse.jdt.annotation.DefaultLocation.*;\n" +
+ "import org.eclipse.jdt.annotation.*;\n" +
+ "\n" +
+ "import java.util.Collection;\n" +
+ "import java.util.Collections;\n" +
+ "\n" +
+ "class Foo {\n" +
+ " static @NonNull String @NonNull [] X = { \"A\" };\n" +
+ "\n" +
+ " @NonNullByDefault({ PARAMETER, RETURN_TYPE, FIELD, TYPE_PARAMETER, TYPE_BOUND, TYPE_ARGUMENT, ARRAY_CONTENTS })\n" +
+ " @SafeVarargs\n" +
+ " static <T> Collection<T> of(@NonNull T @NonNull... elements) {\n" +
+ " return Collections.singleton(elements[0]);\n" +
+ " }\n" +
+ "\n" +
+ " @NonNullByDefault({ PARAMETER, RETURN_TYPE, FIELD, TYPE_PARAMETER, TYPE_BOUND, TYPE_ARGUMENT, ARRAY_CONTENTS })\n" +
+ " static Collection<String[]> foo() {\n" +
+ " return Foo.<String[]>of(X); // <-- warning here\n" +
+ " }\n" +
+ "\n" +
+ " @NonNullByDefault({ PARAMETER, RETURN_TYPE, FIELD, TYPE_PARAMETER, TYPE_BOUND, TYPE_ARGUMENT, ARRAY_CONTENTS })\n" +
+ " static Collection<String[]> bar() {\n" +
+ " return Foo.<String @NonNull []>of(X); // <-- no warning\n" +
+ " }\n" +
+ "}\n" +
+ "",
+ },
+ getCompilerOptions(),
+ "----------\n" +
+ "1. WARNING in Foo.java (at line 12)\n" +
+ " static <T> Collection<T> of(@NonNull T @NonNull... elements) {\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "The nullness annotation is redundant with a default that applies to this location\n" +
+ "----------\n" +
+ "2. WARNING in Foo.java (at line 13)\n" +
+ " return Collections.singleton(elements[0]);\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "Null type safety (type annotations): The expression of type \'Set<T>\' needs unchecked conversion to conform to \'@NonNull Collection<T>\', corresponding supertype is \'Collection<T>\'\n" +
+ "----------\n"
+ );
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/.classpath b/org.eclipse.jdt.core.tests.model/.classpath
index b277a8ac87..01836c4842 100644
--- a/org.eclipse.jdt.core.tests.model/.classpath
+++ b/org.eclipse.jdt.core.tests.model/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.model/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.model/.settings/org.eclipse.jdt.core.prefs
index 1c33923691..9426fc4d4d 100644
--- a/org.eclipse.jdt.core.tests.model/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.core.tests.model/.settings/org.eclipse.jdt.core.prefs
@@ -15,9 +15,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -120,6 +120,6 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF
index ae9504dc50..7e579df3db 100644
--- a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF
@@ -27,7 +27,7 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)",
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
Bundle-Activator: org.eclipse.jdt.core.tests.Activator
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
index bf98fb74e7..4c35264b4a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
@@ -12499,4 +12499,112 @@ public void testBug497245b() {
"}";
formatSource(source);
}
+/**
+ * https://bugs.eclipse.org/500443 - [formatter] NPE on block comment before 'force-wrap' element
+ */
+public void testBug500443() {
+ this.formatterPrefs.alignment_for_enum_constants = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE;
+ this.formatterPrefs.alignment_for_superclass_in_type_declaration = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE;
+ String source =
+ "public class SomeClass\n" +
+ " /* */ extends\n" +
+ " Object {\n" +
+ " enum MyEnum {\n" +
+ " /* 1 */ ONE\n" +
+ " }\n" +
+ "}";
+ formatSource(source);
+}
+/**
+ * https://bugs.eclipse.org/500092 - [formatter] Blank lines at beginning of method body doesn't work in constructors
+ */
+public void testBug500092() {
+ this.formatterPrefs.blank_lines_at_beginning_of_method_body = 1;
+ String source =
+ "public class Test {\n" +
+ " public Test() { int a; }\n" +
+ "}";
+ formatSource(source,
+ "public class Test {\n" +
+ " public Test() {\n" +
+ "\n" +
+ " int a;\n" +
+ " }\n" +
+ "}"
+ );
+}
+/**
+ * https://bugs.eclipse.org/500135 - [formatter] 'Parenthesis positions' ignores single member annotations
+ */
+public void testBug500135() {
+ this.formatterPrefs.parenthesis_positions_in_annotation = DefaultCodeFormatterConstants.SEPARATE_LINES;
+ String source =
+ "@SomeAnnotation(\n" +
+ " \"some value\"\n" +
+ ")\n" +
+ "public class Test {\n" +
+ "}";
+ formatSource(source);
+}
+/**
+ * https://bugs.eclipse.org/500096 - [formatter] Indent declarations within enum declaration doesn't affect enum constants
+ */
+public void testBug500096a() {
+ this.formatterPrefs.indent_body_declarations_compare_to_enum_declaration_header = false;
+ String source =
+ "public enum Test {\n" +
+ "AAA, BBB;\n" +
+ "Test() {\n" +
+ "}\n" +
+ "}";
+ formatSource(source);
+}
+/**
+ * https://bugs.eclipse.org/500096 - [formatter] Indent declarations within enum declaration doesn't affect enum constants
+ */
+public void testBug500096b() {
+ this.formatterPrefs.indent_body_declarations_compare_to_enum_declaration_header = false;
+ this.formatterPrefs.alignment_for_enum_constants = Alignment.M_COMPACT_SPLIT + Alignment.M_INDENT_BY_ONE;
+ String source =
+ "public enum Test {\n" +
+ " AAA, BBB;\n" +
+ "Test() {\n" +
+ "}\n" +
+ "}";
+ formatSource(source);
+}
+/**
+ * https://bugs.eclipse.org/500093 - [formatter] AssertionError with 'Next line on wrap' for array initializers
+ */
+public void testBug500093() {
+ this.formatterPrefs.brace_position_for_array_initializer = DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP;
+ this.formatterPrefs.page_width = 60;
+ this.formatterPrefs.use_tabs_only_for_leading_indentations = true;
+ String source =
+ "public class SomeClass {\n" +
+ " void foo() {\n" +
+ " Arrays.asList(new String[] { \"ddd\", \"eee\", \"fff\" });\n" +
+ " Arrays.asList(new String[] { \"a\", \"b\", \"c\" },\n" +
+ " new String[]\n" +
+ " { \"a\", \"b\", \"c\", });\n" +
+ " Arrays.asList(//\n" +
+ " new String[]\n" +
+ " { \"ddd\", \"eee\", \"fff\" });\n" +
+ " Arrays.asList(\n" +
+ " new String[]\n" +
+ " { \"eedd\", \"eee\", \"fff\" });\n" +
+ " Arrays.asList(\n" +
+ " new String[]\n" +
+ " { \"aa\", \"bb\", \"cc\", \"dd\", \"ee\", \"ff\", \"gg\",\n" +
+ " \"hh\", \"ii\" });\n" +
+ " String[][] test = { { \"aaaaaa\", \"bbbbb\", \"ccccc\" },\n" +
+ " { \"aaaa\", \"bb\", \"ccc\" } };\n" +
+ " test[123456 //\n" +
+ " * (234567 + 345678 + 456789 - 567890\n" +
+ " - 678901)] = new String[]\n" +
+ " { \"a\", \"b\", \"c\" };\n" +
+ " }\n" +
+ "}";
+ formatSource(source);
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExclusionPatternsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExclusionPatternsTests.java
index 41ec92c7aa..eecefeb983 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExclusionPatternsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExclusionPatternsTests.java
@@ -289,12 +289,16 @@ public void testCreateExcludedPackage() throws CoreException {
root.getNonJavaResources());
}
/*
- * Ensure that crearing an excluded package doesn't make it appear as a child of its package fragment root but it is a non-java resource.
+ * Ensure that creating an excluded package doesn't make it appear as a child of its package fragment root but it is a non-java resource.
* (regression test for bug 65637 [model] Excluded package still in Java model)
*/
public void testCreateExcludedPackage2() throws CoreException {
setClasspath(new String[] {"/P/src", "org/*|org/eclipse/*"});
+ // Trigger population of cache to check if it is properly invalidated by the delta processor.
+ // See http://bugs.eclipse.org/500714
+ getPackageFragmentRoot("/P/src").getChildren();
+
clearDeltas();
createFolder("/P/src/org/eclipse/mypack");
diff --git a/org.eclipse.jdt.core.tests.performance/.classpath b/org.eclipse.jdt.core.tests.performance/.classpath
index b277a8ac87..01836c4842 100644
--- a/org.eclipse.jdt.core.tests.performance/.classpath
+++ b/org.eclipse.jdt.core.tests.performance/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/org.eclipse.jdt.core.tests.performance/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core.tests.performance/.settings/org.eclipse.jdt.core.prefs
index f98d4e78c0..1ea67afd84 100644
--- a/org.eclipse.jdt.core.tests.performance/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.core.tests.performance/.settings/org.eclipse.jdt.core.prefs
@@ -9,9 +9,9 @@ org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -94,6 +94,6 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.jdt.core.tests.performance/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.performance/META-INF/MANIFEST.MF
index 550161d420..6d33669ab6 100644
--- a/org.eclipse.jdt.core.tests.performance/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.performance/META-INF/MANIFEST.MF
@@ -17,5 +17,5 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.test.performance;bundle-version="[3.1.0,4.0.0)",
org.eclipse.text;bundle-version="[3.1.0,4.0.0)",
org.eclipse.jdt.core.tests.binaries;bundle-version="1.0.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-BundleShape: dir
diff --git a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
index 73664aef77..c2bdf7136b 100644
--- a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
+++ b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
@@ -305,6 +305,7 @@ public class JDTCompilerAdapter extends DefaultCompilerAdapter {
String source = this.attributes.getSource();
if (source != null) {
this.customDefaultOptions.put(CompilerOptions.OPTION_Source, source);
+ this.customDefaultOptions.put(CompilerOptions.OPTION_Compliance, source);
}
if (compilerArgs != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 058c65a945..be681f5dc3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -97,6 +97,7 @@ import org.eclipse.jdt.internal.compiler.lookup.LocalTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.PolymorphicMethodBinding;
import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.eclipse.jdt.internal.compiler.lookup.SyntheticArgumentBinding;
@@ -3209,7 +3210,7 @@ public class ClassFile implements TypeConstants, TypeIds {
this.contents[localContentsOffset++] = (byte) (functionalDescriptorIndex >> 8);
this.contents[localContentsOffset++] = (byte) functionalDescriptorIndex;
- int methodHandleIndex = this.constantPool.literalIndexForMethodHandle(functional.binding.original()); // Speak of " implementation" (erased) version here, adaptations described below.
+ int methodHandleIndex = this.constantPool.literalIndexForMethodHandle(functional.binding instanceof PolymorphicMethodBinding ? functional.binding : functional.binding.original()); // Speak of " implementation" (erased) version here, adaptations described below.
this.contents[localContentsOffset++] = (byte) (methodHandleIndex >> 8);
this.contents[localContentsOffset++] = (byte) methodHandleIndex;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index c9dc409ea4..c23fe301a1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -652,7 +652,7 @@ public TypeBinding resolveType(BlockScope scope) {
this.genericTypeArguments = new TypeBinding[length];
for (int i = 0; i < length; i++) {
TypeReference typeReference = this.typeArguments[i];
- if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) {
+ if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/, Binding.DefaultLocationTypeArgument)) == null) {
this.argumentsHaveErrors = true;
}
if (this.argumentsHaveErrors && typeReference instanceof Wildcard) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
index 01adeb6f9f..1b5c028279 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
@@ -288,7 +288,7 @@ public class ReferenceExpression extends FunctionalExpression implements IPolyEx
if (this.binding != null && isMethodReference()) {
if (TypeBinding.notEquals(this.binding.declaringClass, this.lhs.resolvedType.erasure())) {
if (!this.binding.declaringClass.canBeSeenBy(currentScope)) {
- this.binding = new MethodBinding(this.binding, (ReferenceBinding) this.lhs.resolvedType.erasure());
+ this.binding = new MethodBinding(this.binding.original(), (ReferenceBinding) this.lhs.resolvedType.erasure());
}
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
index de18a358a5..8ea7a19e58 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -216,6 +216,7 @@ private void checkAndSetModifiersForMethod(MethodBinding methodBinding) {
problemReporter().illegalModifierForAnnotationMember((AbstractMethodDeclaration) this.referenceContext);
else
problemReporter().illegalModifierForInterfaceMethod((AbstractMethodDeclaration) this.referenceContext, sourceLevel);
+ methodBinding.modifiers &= (expectedModifiers | ~ExtraCompilerModifiers.AccJustFlag);
}
return;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java
index e3b74f8a99..fdc72b2c91 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredInitializer.java
@@ -62,9 +62,11 @@ public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValu
this.foundOpeningBrace = true;
this.bracketBalance++;
}
- this.initializerBody = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
+ if (this.initializerBody == null) {
+ return this.initializerBody = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
+ }
if (nestedBlockDeclaration.sourceEnd == 0) return this.initializerBody;
- return this;
+ return this.initializerBody.add(nestedBlockDeclaration, bracketBalanceValue, true);
}
/*
* Record a field declaration (act like inside method body)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java
index e35c22aa99..b4059e0467 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 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
@@ -96,7 +96,11 @@ public RecoveredElement add(Block nestedBlockDeclaration, int bracketBalanceValu
this.bracketBalance++;
}
- this.methodBody = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
+ if (this.methodBody != null) {
+ this.methodBody.addBlockStatement(new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue));
+ } else {
+ this.methodBody = new RecoveredBlock(nestedBlockDeclaration, this, bracketBalanceValue);
+ }
if (nestedBlockDeclaration.sourceEnd == 0) return this.methodBody;
return this;
}
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java
index 24e59f06fd..72c4868110 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java
@@ -268,18 +268,14 @@ public class LineBreaksPreparator extends ASTVisitor {
if (node.getBody() == null)
return true;
- if (node.isConstructor()) {
- handleBracedCode(node.getBody(), null, this.options.brace_position_for_constructor_declaration,
- this.options.indent_statements_compare_to_body,
- this.options.insert_new_line_in_empty_method_body);
- } else {
- handleBracedCode(node.getBody(), null, this.options.brace_position_for_method_declaration,
- this.options.indent_statements_compare_to_body,
- this.options.insert_new_line_in_empty_method_body);
- Token openBrace = this.tm.firstTokenIn(node.getBody(), TokenNameLBRACE);
- if (openBrace.getLineBreaksAfter() > 0) // if not, these are empty braces
- openBrace.putLineBreaksAfter(this.options.blank_lines_at_beginning_of_method_body + 1);
- }
+ String bracePosition = node.isConstructor() ? this.options.brace_position_for_constructor_declaration
+ : this.options.brace_position_for_method_declaration;
+ handleBracedCode(node.getBody(), null, bracePosition,
+ this.options.indent_statements_compare_to_body,
+ this.options.insert_new_line_in_empty_method_body);
+ Token openBrace = this.tm.firstTokenIn(node.getBody(), TokenNameLBRACE);
+ if (openBrace.getLineBreaksAfter() > 0) // if not, these are empty braces
+ openBrace.putLineBreaksAfter(this.options.blank_lines_at_beginning_of_method_body + 1);
return true;
}
@@ -427,10 +423,6 @@ public class LineBreaksPreparator extends ASTVisitor {
@Override
public boolean visit(NormalAnnotation node) {
handleAnnotation(node);
-
- int lParen = this.tm.firstIndexAfter(node.getTypeName(), TokenNameLPAREN);
- int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_annotation);
return true;
}
@@ -530,6 +522,12 @@ public class LineBreaksPreparator extends ASTVisitor {
}
if (breakAfter)
this.tm.lastTokenIn(node, -1).breakAfter();
+
+ if (!(node instanceof MarkerAnnotation)) {
+ int lParen = this.tm.firstIndexAfter(node.getTypeName(), TokenNameLPAREN);
+ int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_annotation);
+ }
}
@Override
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapExecutor.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapExecutor.java
index 9783803555..bd12cf7873 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapExecutor.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapExecutor.java
@@ -122,6 +122,7 @@ public class WrapExecutor {
*/
public int analyzeLine(int startIndex, int indent) {
Token startToken = WrapExecutor.this.tm.get(startIndex);
+ assert startToken.getLineBreaksBefore() > 0;
this.counter = WrapExecutor.this.tm.toIndent(indent, startToken.isWrappable());
this.lineIndent = indent;
this.firstPotentialWrap = -1;
@@ -170,11 +171,11 @@ public class WrapExecutor {
if (this.lineExceeded && this.firstPotentialWrap >= 0) {
return false;
}
- if (!token.isNextLineOnWrap())
- token.setIndent(this.lineIndent);
+ token.setIndent(this.lineIndent);
- boolean isLineEnd = getLineBreaksAfter() > 0 || getNext() == null;
- assert !(token.isNextLineOnWrap() && !isLineEnd);
+ boolean isLineEnd = getLineBreaksAfter() > 0 || getNext() == null
+ || (getNext().isNextLineOnWrap() && WrapExecutor.this.tm
+ .get(WrapExecutor.this.tm.findFirstTokenInLine(index)).isWrappable());
return !isLineEnd;
}
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java
index 5b052b854c..468821d052 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java
@@ -582,13 +582,18 @@ public class WrapPreparator extends ASTVisitor {
prepareElementsList(expressions, TokenNameCOMMA, TokenNameLBRACE);
handleWrap(this.options.alignment_for_expressions_in_array_initializer, node);
}
+ int openingBraceIndex = this.tm.firstIndexIn(node, TokenNameLBRACE);
+ Token openingBrace = this.tm.get(openingBraceIndex);
+ if (openingBrace.isNextLineOnWrap() && openingBrace.getWrapPolicy() == null && openingBraceIndex > 0) {
+ // add fake wrap policy to make sure the brace indentation is right
+ openingBrace.setWrapPolicy(new WrapPolicy(WrapMode.DISABLED, openingBraceIndex - 1, 0));
+ }
if (!this.options.join_wrapped_lines
&& !this.options.insert_new_line_before_closing_brace_in_array_initializer) {
// if there is a line break before the closing brace, formatter should treat it as a valid wrap to preserve
int closingBraceIndex = this.tm.lastIndexIn(node, TokenNameRBRACE);
Token closingBrace = this.tm.get(closingBraceIndex);
if (this.tm.countLineBreaksBetween(this.tm.get(closingBraceIndex - 1), closingBrace) == 1) {
- int openingBraceIndex = this.tm.firstIndexIn(node, TokenNameLBRACE);
closingBrace.setWrapPolicy(new WrapPolicy(WrapMode.WHERE_NECESSARY, openingBraceIndex,
closingBraceIndex, 0, this.currentDepth, 1, true, false));
}
@@ -864,7 +869,7 @@ public class WrapPreparator extends ASTVisitor {
if (policy == null)
return;
- setTokenWrapPolicy(this.wrapIndexes.get(0), policy, true);
+ setTokenWrapPolicy(0, policy, true);
boolean wrapPreceedingComments = !(parentNode instanceof InfixExpression)
|| !this.options.wrap_before_binary_operator;
@@ -872,7 +877,7 @@ public class WrapPreparator extends ASTVisitor {
penalty = this.wrapPenalties.size() > i ? this.wrapPenalties.get(i) : 1;
if (penalty != policy.penaltyMultiplier || i == 1)
policy = getWrapPolicy(wrappingOption, penalty, false, parentNode);
- setTokenWrapPolicy(this.wrapIndexes.get(i), policy, wrapPreceedingComments);
+ setTokenWrapPolicy(i, policy, wrapPreceedingComments);
}
boolean forceWrap = (wrappingOption & Alignment.M_FORCE) != 0;
@@ -904,7 +909,8 @@ public class WrapPreparator extends ASTVisitor {
}
}
- private void setTokenWrapPolicy(int index, WrapPolicy policy, boolean wrapPreceedingComments) {
+ private void setTokenWrapPolicy(int wrapIndexesIndex, WrapPolicy policy, boolean wrapPreceedingComments) {
+ int index = this.wrapIndexes.get(wrapIndexesIndex);
if (wrapPreceedingComments) {
for (int i = index - 1; i >= 0; i--) {
Token previous = this.tm.get(i);
@@ -915,6 +921,7 @@ public class WrapPreparator extends ASTVisitor {
if (previous.getLineBreaksBefore() > 0)
previous.setWrapPolicy(policy);
}
+ this.wrapIndexes.set(wrapIndexesIndex, index);
}
Token token = this.tm.get(index);
@@ -937,6 +944,8 @@ public class WrapPreparator extends ASTVisitor {
} else if (parentNode instanceof EnumDeclaration) {
// special behavior for compatibility with legacy formatter
extraIndent = ((wrappingOption & Alignment.M_INDENT_BY_ONE) != 0) ? 2 : 1;
+ if (!this.options.indent_body_declarations_compare_to_enum_declaration_header)
+ extraIndent--;
isAlreadyWrapped = isFirst;
} else if (parentNode instanceof IfStatement) {
extraIndent = 1;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
index 7e2c8ff40c..e27cafd597 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessor.java
@@ -503,8 +503,24 @@ public class DeltaProcessor {
break;
case IResource.FOLDER:
- if (delta.getKind() == IResourceDelta.CHANGED) { // look for .jar file change to update classpath
- children = delta.getAffectedChildren();
+ switch (delta.getKind()) {
+ case IResourceDelta.ADDED:
+ case IResourceDelta.REMOVED:
+ // Close the containing package fragment root to reset its cached children.
+ // See http://bugs.eclipse.org/500714
+ IPackageFragmentRoot root = findContainingPackageFragmentRoot(resource);
+ if (root != null && root.isOpen()) {
+ try {
+ root.close();
+ } catch (JavaModelException e) {
+ Util.log(e);
+ }
+ }
+ break;
+
+ case IResourceDelta.CHANGED: // look for .jar file change to update classpath
+ children = delta.getAffectedChildren();
+ break;
}
break;
case IResource.FILE :
@@ -562,6 +578,27 @@ public class DeltaProcessor {
}
}
+ private IPackageFragmentRoot findContainingPackageFragmentRoot(IResource resource) {
+ IProject project = resource.getProject();
+ if (JavaProject.hasJavaNature(project)) {
+ IJavaProject javaProject = JavaCore.create(project);
+ try {
+ IPath path = resource.getProjectRelativePath();
+ IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
+ for (IPackageFragmentRoot root : roots) {
+ IResource rootResource = root.getUnderlyingResource();
+ if (rootResource != null && !resource.equals(rootResource) &&
+ rootResource.getProjectRelativePath().isPrefixOf(path)) {
+ return root;
+ }
+ }
+ } catch (JavaModelException e) {
+ Util.log(e);
+ }
+ }
+ return null;
+ }
+
private void checkExternalFolderChange(IProject project, JavaProject javaProject) {
ClasspathChange change = this.state.getClasspathChange(project);
this.state.addExternalFolderChange(javaProject, change == null ? null : change.oldResolvedClasspath);
@@ -1922,7 +1959,7 @@ public class DeltaProcessor {
* caches and their dependents
*/
public void resetProjectCaches() {
- if (this.projectCachesToReset.size() == 0)
+ if (this.projectCachesToReset.isEmpty())
return;
JavaModelManager.getJavaModelManager().resetJarTypeCache();

Back to the top