Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome lanneluc2004-07-08 10:20:34 +0000
committerJerome lanneluc2004-07-08 10:20:34 +0000
commitee727fd2200c67c6eb6242fd936ef21a092d3dba (patch)
treeb20d701ce2dcaed29f66bb4bede7e2a9674ee94e
parent9acf05725e6923d5d42a3d66478f873c5c9f96d5 (diff)
downloadeclipse.jdt.core-ee727fd2200c67c6eb6242fd936ef21a092d3dba.tar.gz
eclipse.jdt.core-ee727fd2200c67c6eb6242fd936ef21a092d3dba.tar.xz
eclipse.jdt.core-ee727fd2200c67c6eb6242fd936ef21a092d3dba.zip
69028
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/LocalElementTests.java33
-rw-r--r--org.eclipse.jdt.core/buildnotes_jdt-core.html8
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java6
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java2
4 files changed, 47 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/LocalElementTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/LocalElementTests.java
index eec7ac4105..31fa984433 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/LocalElementTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/LocalElementTests.java
@@ -178,6 +178,39 @@ public class LocalElementTests extends ModifyingResourceTests {
}
/*
+ * Anonymous type test.
+ * (regression test for bug 69028 Anonymous type in argument of super() is not in type hierarchy)
+ */
+ public void testAnonymousType5() throws CoreException {
+ try {
+ createFile(
+ "/P/X.java",
+ "public class X {\n" +
+ " X(Object o) {\n" +
+ " }\n" +
+ "}\n" +
+ "class Y extends X {\n" +
+ " Y() {\n" +
+ " super(new Object() {});\n" +
+ " }\n" +
+ "}"
+ );
+ ICompilationUnit cu = getCompilationUnit("/P/X.java");
+ assertElementDescendants(
+ "Unexpected compilation unit contents",
+ "X.java\n" +
+ " class X\n" +
+ " X(Object)\n" +
+ " class Y\n" +
+ " Y()\n" +
+ " class <anonymous #1>",
+ cu);
+ } finally {
+ deleteFile("/P/X.java");
+ }
+ }
+
+ /*
* IType.getSuperclassName() test
*/
public void testGetSuperclassName() throws CoreException {
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html
index fab1fb2c5f..e3e1e69904 100644
--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -47,10 +47,16 @@ What's new in this drop</h2>
<ul>
<li> Plugin version ID got incremented to 3.0.1.</li>
<li>*TODO* all resource change listeners/builder to react to new encoding change notification </li>
+<li>Fix for bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=69028">69028</a>
+ requires the index version to be incremented. Indexes will be automatically regenerated upon
+ subsequent search queries (accounting for indexing notification in search progress dialogs).
+</li>
</ul>
<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=68698">68698</a>
+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=69028">69028</a>
+Anonymous type in argument of super() is not in type hierarchy
+<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=68698">68698</a>
Bug in inner class emulation:compiler doesn't reject illegal code.
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=52916">52916</a>
Strange error message when using jre1.5.0 libraries
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java
index 24e9c98f1c..469d08aa25 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java
@@ -1299,6 +1299,12 @@ public void addUnknownRef(NameReference nameRef) {
private void visitIfNeeded(AbstractMethodDeclaration method) {
if (this.localDeclarationVisitor != null
&& (method.bits & ASTNode.HasLocalTypeMASK) != 0) {
+ if (method instanceof ConstructorDeclaration) {
+ ConstructorDeclaration constructorDeclaration = (ConstructorDeclaration) method;
+ if (constructorDeclaration.constructorCall != null) {
+ constructorDeclaration.constructorCall.traverse(this.localDeclarationVisitor, method.scope);
+ }
+ }
if (method.statements != null) {
int statementsLength = method.statements.length;
for (int i = 0; i < statementsLength; i++)
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java
index a9f684e307..ca546427fa 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java
@@ -32,7 +32,7 @@ private int cacheUserCount;
private String[][] cachedChunks; // decompressed chunks of document names
private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet
-public static final String SIGNATURE= "INDEX VERSION 1.001"; //$NON-NLS-1$
+public static final String SIGNATURE= "INDEX VERSION 1.002"; //$NON-NLS-1$
public static boolean DEBUG = false;
private static final int RE_INDEXED = -1;

Back to the top