Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2016-09-05 15:30:13 +0000
committerMarkus Keller2016-09-05 15:30:13 +0000
commit8d3656f24c3e874f200c42da415930e5a37a16ba (patch)
tree759cfb1ea681fea7dfb0b04c1de2fa5d4d76950b
parentf684b9a68e285ab0ad602f1b9f3fe0bcd956f2f6 (diff)
downloadeclipse.jdt.core-8d3656f24c3e874f200c42da415930e5a37a16ba.tar.gz
eclipse.jdt.core-8d3656f24c3e874f200c42da415930e5a37a16ba.tar.xz
eclipse.jdt.core-8d3656f24c3e874f200c42da415930e5a37a16ba.zip
Bug 500211: [1.9] Help does not work if JDT Java 9 beta is installedY20160908-1000
Workaround for the AbstractMethodErrors. Fixes the Help server when running with Java 8. Doesn't work with current JDK 9 previews, because they broke java.lang.ClassLoader#getResourceAsStream(String). Change-Id: I9a39f9cf1c8c9111650d3d9b73a7da8a289199d3
-rw-r--r--org.eclipse.jdt.core/.classpath2
-rw-r--r--org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--org.eclipse.jdt.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java15
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironment.java71
5 files changed, 82 insertions, 14 deletions
diff --git a/org.eclipse.jdt.core/.classpath b/org.eclipse.jdt.core/.classpath
index 6add95f909..cfba090bb6 100644
--- a/org.eclipse.jdt.core/.classpath
+++ b/org.eclipse.jdt.core/.classpath
@@ -9,7 +9,7 @@
<classpathentry kind="src" path="formatter"/>
<classpathentry kind="src" path="model"/>
<classpathentry kind="src" path="search"/>
- <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.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs
index 2ae8a65383..a1ccd58592 100644
--- a/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.core/.settings/org.eclipse.jdt.core.prefs
@@ -25,9 +25,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
@@ -131,7 +131,7 @@ 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.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index 9bf05a01d3..91aa0769a4 100644
--- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -61,6 +61,6 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)",
org.eclipse.text;bundle-version="[3.1.0,4.0.0)",
org.eclipse.team.core;bundle-version="[3.1.0,4.0.0)";resolution:=optional
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Eclipse-ExtensibleAPI: true
Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java
index 244df6e45d..51d1343648 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/ICompilationUnit.java
@@ -16,6 +16,13 @@ package org.eclipse.jdt.internal.compiler.env;
/**
* This interface denotes a compilation unit, providing its name and content.
+ *
+ * <p>
+ * Note: This internal interface has been implemented illegally by the
+ * org.apache.jasper.glassfish bundle from Orbit, see
+ * <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=500211">bug 500211</a>.
+ * Avoid changing the API or supply default methods to avoid breaking the Eclipse Help system.
+ * </p>
*/
public interface ICompilationUnit extends IDependent {
/**
@@ -43,11 +50,15 @@ char[][] getPackageName();
* Answer if optional problems should be ignored for this compilation unit.
* Implementors should return <code>false</code> if there is no preference.
*/
-boolean ignoreOptionalProblems();
+default boolean ignoreOptionalProblems() {
+ return false;
+}
/**
* Returns the name of the module that this compilation unit belongs to.
*
* @return the name of the module as a char array.
*/
-public char[] module();
+default char[] module() {
+ return null;
+}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironment.java
index 22cb35fc57..081562f11e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/INameEnvironment.java
@@ -19,6 +19,13 @@ package org.eclipse.jdt.internal.compiler.env;
* can use to look up types, compilation units, and packages in the
* current environment. The name environment is passed to the compiler
* on creation.
+ *
+ * <p>
+ * Note: This internal interface has been implemented illegally by the
+ * org.apache.jasper.glassfish bundle from Orbit, see
+ * <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=500211">bug 500211</a>.
+ * Avoid changing the API or supply default methods to avoid breaking the Eclipse Help system.
+ * </p>
*/
public interface INameEnvironment {
/**
@@ -33,9 +40,20 @@ public interface INameEnvironment {
* NOTE: This method can be used to find a member type using its
* internal name A$B, but the source file for A is answered if the binary
* file is inconsistent.
+ *
+ * NOTE: Implementers must reimplement this method!
*/
+default NameEnvironmentAnswer findType(char[][] compoundTypeName, char[] client) {
+ return findType(compoundTypeName);
+}
+/**
+ * @deprecated don't override this method any more, but override {@link #findType(char[][], char[])}
+ */
+@Deprecated
+default NameEnvironmentAnswer findType(char[][] compoundTypeName) {
+ return findType(compoundTypeName, null /*JRTUtil.JAVA_BASE_CHAR*/);
+}
-NameEnvironmentAnswer findType(char[][] compoundTypeName, char[] client);
/**
* Find a type named <typeName> in the package <packageName> if it is readable
* to the given module.
@@ -49,9 +67,20 @@ NameEnvironmentAnswer findType(char[][] compoundTypeName, char[] client);
* NOTE: This method can be used to find a member type using its
* internal name A$B, but the source file for A is answered if the binary
* file is inconsistent.
+ *
+ * NOTE: Implementers must reimplement this method!
*/
+default NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] client) {
+ return findType(typeName, packageName);
+}
+/**
+ * @deprecated don't override this method any more, but override {@link #findType(char[], char[][], char[])}
+ */
+@Deprecated
+default NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) {
+ return findType(typeName, packageName, null /*JRTUtil.JAVA_BASE_CHAR*/);
+}
-NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] client);
/**
* Answer whether packageName is the name of a known subpackage inside
* the package parentPackageName if it is readable
@@ -61,22 +90,50 @@ NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] cli
* For example:
* isPackage({{java}, {awt}}, {event});
* isPackage(null, {java});
+ *
+ * NOTE: Implementers must reimplement this method!
*/
-boolean isPackage(char[][] parentPackageName, char[] packageName, char[] client);
+default boolean isPackage(char[][] parentPackageName, char[] packageName, char[] client) {
+ return isPackage(parentPackageName, packageName);
+}
+/**
+ * @deprecated don't override this method any more, but override {@link #isPackage(char[][], char[], char[])}
+ */
+@Deprecated
+default boolean isPackage(char[][] parentPackageName, char[] packageName) {
+ return isPackage(parentPackageName, packageName, null /*JRTUtil.JAVA_BASE_CHAR*/);
+}
/**
* Accepts (and preserves if necessary) the given module and the corresponding
* module location. This helps the name environment to later whether or not
* a particular module location should be queried for types in a specific module.
*
+ * NOTE: Implementers must reimplement this method!
+ *
* @param module
* @param location
*/
-public void acceptModule(IModule module, IModuleLocation location);
-public boolean isPackageVisible(char[] pack, char[] source, char[] client);
-public IModule getModule(char[] name);
-public IModule getModule(IModuleLocation location);
+default public void acceptModule(IModule module, IModuleLocation location) {
+ // empty default implementation for compatibility
+}
+/**
+ * NOTE: Implementers must reimplement this method!
+ */
+default public boolean isPackageVisible(char[] pack, char[] source, char[] client) { return true; }
+/**
+ * NOTE: Implementers must reimplement this method!
+ */
+default public IModule getModule(char[] name) {
+ return null;
+}
+/**
+ * NOTE: Implementers must reimplement this method!
+ */
+default public IModule getModule(IModuleLocation location) {
+ return null;
+}
/**
* This method cleans the environment. It is responsible for releasing the memory

Back to the top