Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptff2004-09-22 13:15:46 -0400
committerptff2004-09-22 13:15:46 -0400
commit6635f8a9a49dfb93a63a851a607addfcd6d83842 (patch)
treefdce176fa5d3396921df45832ea778e23a5e6d8f
parent3b9b7a7d0a241f57946c2f7535b52039d498213e (diff)
downloadeclipse.jdt.core-6635f8a9a49dfb93a63a851a607addfcd6d83842.tar.gz
eclipse.jdt.core-6635f8a9a49dfb93a63a851a607addfcd6d83842.tar.xz
eclipse.jdt.core-6635f8a9a49dfb93a63a851a607addfcd6d83842.zip
R3_0_maintenance: rollback to 3.0.1 (version v_452_R30x)R3_0_1
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java2
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java8
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java101
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java8
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java20
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchJavadocTests.java53
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java59
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/.classpath1
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/test5.jarbin1513 -> 0 bytes
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.java14
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.java14
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/A.java6
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/B.java6
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.java8
-rw-r--r--org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.java19
-rw-r--r--org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java24
-rw-r--r--org.eclipse.jdt.core/buildnotes_jdt-core.html31
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java27
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java4
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java3
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java56
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java30
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java8
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java4
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/Indents.java12
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java6
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementRequestorAdapter.java2
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java7
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java4
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMCompilationUnit.java2
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java6
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java32
-rw-r--r--org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java17
33 files changed, 120 insertions, 474 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java
index 26b2d80f29..7cf6f15141 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java
@@ -1077,7 +1077,7 @@ public class JavadocTestForInterface extends JavadocTest {
+ " * Invalid javadoc tags with valid deprecation\n"
+ " *\n"
+ " * @param\n"
- + " * @return String\n"
+ + " * @return\n"
+ " * @throws Unknown\n"
+ " * @see \"Invalid\n"
+ " * @see Unknown\n"
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
index 2c2716c8ad..de09cae88e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java
@@ -180,7 +180,7 @@ public class JavadocTestForMethod extends JavadocTest {
+ " * Invalid javadoc tags with valid deprecation at end\n"
+ " *\n"
+ " * @param\n"
- + " * @return String\n"
+ + " * @return\n"
+ " * @throws Unknown\n"
+ " * @see \"Invalid\n"
+ " * @see Unknown\n"
@@ -285,7 +285,7 @@ public class JavadocTestForMethod extends JavadocTest {
+ " *\n"
+ " * @deprecated\n"
+ " * @param\n"
- + " * @return String\n"
+ + " * @return\n"
+ " * @throws Unknown\n"
+ " * @exception IllegalArgumentException Valid throws tag\n"
+ " * @see \"Invalid\n"
@@ -389,7 +389,7 @@ public class JavadocTestForMethod extends JavadocTest {
+ " * Invalid javadoc tags with valid deprecation in the middle\n"
+ " *\n"
+ " * @param\n"
- + " * @return String\n"
+ + " * @return\n"
+ " * @throws Unknown\n"
+ " * @exception IllegalArgumentException Valid throws tag\n"
+ " * @see \"Invalid\n"
@@ -1658,7 +1658,7 @@ public class JavadocTestForMethod extends JavadocTest {
+ " /**\n"
+ " * Invalid return declaration\n"
+ " *\n"
- + " * @return String\n"
+ + " * @return\n"
+ " * @return Dimension\n"
+ " */\n"
+ " public double s_foo() {\n"
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
index acda1062ea..548bc450d9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
@@ -36,7 +36,7 @@ public class JavadocTestMixed extends JavadocTest {
static {
// Names of tests to run: can be "testBugXXXX" or "BugXXXX")
// testsNames = new String[] {
-// "Bug73995"
+// "Bug68726conform1", "Bug68726conform2", "Bug68726negative1", "Bug68726negative2"
// };
// Numbers of tests to run: "test<number>" will be run for each number of this array
// testsNumbers = new int[] { 3, 7, 10, 21 };
@@ -1771,7 +1771,7 @@ public class JavadocTestMixed extends JavadocTest {
" * IllegalAccessException\n" +
" * @throws\n" +
" * NullPointerException tag description not empty\n" +
- " * @return int\n" +
+ " * @return\n" +
" * an integer\n" +
" * @see\n" +
" * String\n" +
@@ -3071,17 +3071,17 @@ public class JavadocTestMixed extends JavadocTest {
"----------\n" +
"1. ERROR in X.java (at line 2)\n" +
" /**@return*/\n" +
- " ^^^^^^\n" +
+ " ^^^^^^^\n" +
"Javadoc: Invalid tag\n" +
"----------\n" +
"2. ERROR in X.java (at line 4)\n" +
" /**@return */\n" +
- " ^^^^^^\n" +
+ " ^^^^^^^^^^^^^^^\n" +
"Javadoc: Invalid tag\n" +
"----------\n" +
"3. ERROR in X.java (at line 6)\n" +
" /**@return****/\n" +
- " ^^^^^^\n" +
+ " ^^^^^^^^^^\n" +
"Javadoc: Invalid tag\n" +
"----------\n" +
"4. ERROR in X.java (at line 9)\n" +
@@ -3109,12 +3109,12 @@ public class JavadocTestMixed extends JavadocTest {
"----------\n" +
"1. ERROR in X.java (at line 3)\n" +
" * @return* */\n" +
- " ^^^^^^\n" +
+ " ^^^^^^^\n" +
"Javadoc: Invalid tag\n" +
"----------\n" +
"2. ERROR in X.java (at line 5)\n" +
" /**@return** **/\n" +
- " ^^^^^^\n" +
+ " ^^^^^^^^\n" +
"Javadoc: Invalid tag\n" +
"----------\n"
);
@@ -3135,7 +3135,7 @@ public class JavadocTestMixed extends JavadocTest {
"----------\n" +
"1. ERROR in X.java (at line 3)\n" +
" * @return#\n" +
- " ^^^^^^\n" +
+ " ^^^^^^^\n" +
"Javadoc: Invalid tag\n" +
"----------\n"
);
@@ -3723,89 +3723,4 @@ public class JavadocTestMixed extends JavadocTest {
"----------\n"
);
}
-
- /**
- * Test fix for bug 73348: [Javadoc] Missing description for return tag is not always warned
- * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73348">73348</a>
- */
- public void testBug73348conform() {
- reportMissingJavadocTags = CompilerOptions.IGNORE;
- reportMissingJavadocComments = CompilerOptions.IGNORE;
- runConformTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " /**\n" +
- " * @return \n" +
- " * int\n" +
- " */\n" +
- " public int foo1() {return 0; }\n" +
- " /**\n" +
- " * @return \n" +
- " * int\n" +
- " * @see Object\n" +
- " */\n" +
- " public int foo2() {return 0; }\n" +
- "}\n",
- }
- );
- }
- public void testBug73348negative() {
- reportMissingJavadocComments = CompilerOptions.IGNORE;
- runNegativeTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " /**\n" +
- " * @return\n" +
- " * @see Object\n" +
- " */\n" +
- " public int foo1() {return 0; }\n" +
- " /**\n" +
- " * @return \n" +
- " * @see Object\n" +
- " */\n" +
- " public int foo2() {return 0; }\n" +
- "}\n",
- },
- "----------\n" +
- "1. ERROR in X.java (at line 3)\n" +
- " * @return\n" +
- " ^^^^^^\n" +
- "Javadoc: Invalid tag\n" +
- "----------\n" +
- "2. ERROR in X.java (at line 8)\n" +
- " * @return \n" +
- " ^^^^^^\n" +
- "Javadoc: Invalid tag\n" +
- "----------\n"
- );
- }
-
- /**
- * Test fix for bug 73995: [Javadoc] Wrong warning for missing return type description for @return {@inheritDoc}
- * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73995">73995</a>
- */
- public void testBug73995() {
- reportMissingJavadocTags = CompilerOptions.IGNORE;
- reportMissingJavadocComments = CompilerOptions.IGNORE;
- runConformTest(
- new String[] {
- "X.java",
- "public class X {\n" +
- " /**\n" +
- " * @return {@link Object} \n" +
- " */\n" +
- " public int foo1() {return 0; }\n" +
- " /** @return {@inheritedDoc} */\n" +
- " public int foo2() {return 0; }\n" +
- " /**\n" +
- " * @return\n" +
- " * {@unknown_tag}\n" +
- " */\n" +
- " public int foo3() {return 0; }\n" +
- "}\n",
- }
- );
- }
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java
index 84c8b7f970..02c54c3fad 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java
@@ -2133,12 +2133,4 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
public void testBug68726() throws JavaModelException {
verifyComments("testBug68726");
}
-
- /**
- * Test fix for bug 73348: [Javadoc] Missing description for return tag is not always warned
- * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73348">73348</a>
- */
- public void testBug73348() throws JavaModelException {
- verifyComments("testBug73348");
- }
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
index d49d65de89..e9079f085c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
@@ -670,24 +670,4 @@ public void testRootPath11() throws JavaModelException {
root.close();
}
-/**
- * Attach a jar with a source attachement that is itself. The jar contains 2 root paths for the same class file.
- * (regression test for bug 74014 prefix path for source attachements - automatic detection does not seem to work)
- */
-public void testRootPath12() throws JavaModelException {
- IJavaProject project = this.getJavaProject("/AttachSourceTests");
- IPackageFragmentRoot root = project.getPackageFragmentRoot(this.getFile("/AttachSourceTests/test5.jar"));
- attachSource(root, "/AttachSourceTests/test5.jar", null);
-
- IClassFile cf = root.getPackageFragment("p1.p2").getClassFile("X.class");
- assertSourceEquals(
- "Unexpected source for class file",
- "package p1.p2;\n" +
- "public class X {\n" +
- "}\n",
- cf.getSource());
- attachSource(root, null, null); // detach source
- root.close();
-}
-
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchJavadocTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchJavadocTests.java
index 1751f29326..91dc0da18a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchJavadocTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchJavadocTests.java
@@ -88,8 +88,6 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
System.err.println("WARNING: only subset of tests will be executed!!!");
suite.addTest(new JavaSearchJavadocTests("testBug54962"));
suite.addTest(new JavaSearchJavadocTests("testBug54962qualified"));
- suite.addTest(new JavaSearchJavadocTests("testBug71267"));
- suite.addTest(new JavaSearchJavadocTests("testBug71267qualified"));
return suite;
}
@@ -155,8 +153,6 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
suite.addTest(new JavaSearchJavadocTests("testBug49994constructor", support));
suite.addTest(new JavaSearchJavadocTests("testBug54962", support));
suite.addTest(new JavaSearchJavadocTests("testBug54962qualified", support));
- suite.addTest(new JavaSearchJavadocTests("testBug71267", support));
- suite.addTest(new JavaSearchJavadocTests("testBug71267qualified", support));
}
/* (non-Javadoc)
@@ -1009,10 +1005,10 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "j6", "Bug54962.java").getPackageDeclaration("j6");
search(packDecl, REFERENCES, getJavaSearchScope(), result);
assertSearchResults(
- "src/j6/Bug54962.java j6.Bug54962 [j6] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/j6/Bug54962.java j6.Bug54962 [j6] POTENTIAL_MATCH INSIDE_JAVADOC\n" +
- "src/j6/Bug54962.java j6.Bug54962 [j6] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/j7/qua/li/fied/Bug54962a.java [j6] EXACT_MATCH OUTSIDE_JAVADOC",
+ "src/j6/Bug54962.java [j6] EXACT_MATCH INSIDE_JAVADOC\n" +
+ "src/j6/Bug54962.java j6.Bug54962 [j6] POTENTIAL_MATCH INSIDE_JAVADOC\n" +
+ "src/j6/Bug54962.java j6.Bug54962 [j6] EXACT_MATCH INSIDE_JAVADOC\n" +
+ "src/j7/qua/li/fied/Bug54962a.java [j6] EXACT_MATCH OUTSIDE_JAVADOC",
result);
}
public void testBug54962qualified() throws CoreException {
@@ -1023,44 +1019,9 @@ public class JavaSearchJavadocTests extends JavaSearchTests {
IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "j7.qua.li.fied", "Bug54962a.java").getPackageDeclaration("j7.qua.li.fied");
search(packDecl, REFERENCES, getJavaSearchScope(), result);
assertSearchResults(
- "src/j7/qua/li/fied/Bug54962a.java j7.qua.li.fied.Bug54962a [j7.qua.li.fied] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/j7/qua/li/fied/Bug54962a.java j7.qua.li.fied.Bug54962a [j7.qua.li.fied] POTENTIAL_MATCH INSIDE_JAVADOC\n" +
- "src/j7/qua/li/fied/Bug54962a.java j7.qua.li.fied.Bug54962a [j7.qua.li.fied] EXACT_MATCH INSIDE_JAVADOC",
- result);
- }
-
- /**
- * Test fix for bug 71267: [Search][Javadoc] SearchMatch in class javadoc reported with element of type IImportDeclaration
- * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=71267">71267</a>
- * @throws CoreException
- */
- public void testBug71267() throws CoreException {
- setJavadocOptions();
- JavaSearchResultCollector result = new JavaSearchResultCollector();
- result.showAccuracy = true;
- result.showInsideDoc = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267", "Test.java").getPackageDeclaration("p71267");
- search(packDecl, REFERENCES, getJavaSearchScope(), result);
- assertSearchResults(
- "src/p71267/Test.java p71267.Test [p71267] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/p71267/Test.java p71267.Test [p71267] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/p71267/q71267/Test.java p71267.q71267.Test [p71267] EXACT_MATCH INSIDE_JAVADOC",
- result);
- }
- public void testBug71267qualified() throws CoreException {
- setJavadocOptions();
- JavaSearchResultCollector result = new JavaSearchResultCollector();
- result.showAccuracy = true;
- result.showInsideDoc = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267.q71267", "Test.java").getPackageDeclaration("p71267.q71267");
- search(packDecl, REFERENCES, getJavaSearchScope(), result);
- assertSearchResults(
- "src/p71267/q71267/Test.java p71267.q71267.Test [p71267.q71267] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/p71267/q71267/Test.java p71267.q71267.Test [p71267.q71267] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/p71267/q71267/Test.java p71267.q71267.Test.field [p71267.q71267] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/p71267/q71267/Test.java p71267.q71267.Test.field [p71267.q71267] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/p71267/q71267/Test.java void p71267.q71267.Test.method() [p71267.q71267] EXACT_MATCH INSIDE_JAVADOC\n" +
- "src/p71267/q71267/Test.java void p71267.q71267.Test.method() [p71267.q71267] EXACT_MATCH INSIDE_JAVADOC",
+ "src/j7/qua/li/fied/Bug54962a.java [j7.qua.li.fied] EXACT_MATCH INSIDE_JAVADOC\n" +
+ "src/j7/qua/li/fied/Bug54962a.java j7.qua.li.fied.Bug54962a [j7.qua.li.fied] POTENTIAL_MATCH INSIDE_JAVADOC\n" +
+ "src/j7/qua/li/fied/Bug54962a.java j7.qua.li.fied.Bug54962a [j7.qua.li.fied] EXACT_MATCH INSIDE_JAVADOC",
result);
}
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java
index 032ce2b503..bddb113f7d 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchTests.java
@@ -302,7 +302,6 @@ public static Test suite() {
suite.addTest(new JavaSearchTests("testSimplePackageDeclaration"));
suite.addTest(new JavaSearchTests("testVariousPackageDeclarations"));
suite.addTest(new JavaSearchTests("testPackageDeclaration"));
- suite.addTest(new JavaSearchTests("testPackageDeclarationBug73551"));
// package reference
suite.addTest(new JavaSearchTests("testSimplePackageReference"));
@@ -436,8 +435,6 @@ public static Test suite() {
suite.addTest(new JavaSearchTests("testFieldReference5"));
suite.addTest(new JavaSearchTests("testFieldReference6"));
suite.addTest(new JavaSearchTests("testFieldReference7"));
- suite.addTest(new JavaSearchTests("testFieldReferenceBug73112a"));
- suite.addTest(new JavaSearchTests("testFieldReferenceBug73112b"));
suite.addTest(new JavaSearchTests("testFieldReferenceInInnerClass"));
suite.addTest(new JavaSearchTests("testFieldReferenceInAnonymousClass"));
suite.addTest(new JavaSearchTests("testFieldReferenceThroughSubclass"));
@@ -1189,47 +1186,6 @@ public void testFieldReference7() throws CoreException {
resultCollector);
}
/**
- * Field reference test.
- * (regression test for bug 73112: [Search] SearchEngine doesn't find all fields multiple field declarations
- */
-public void testFieldReferenceBug73112a() throws CoreException {
- JavaSearchResultCollector resultCollector = new JavaSearchResultCollector();
- search(
- "fieldA73112*",
- FIELD,
- ALL_OCCURRENCES,
- getJavaSearchScope(),
- resultCollector);
- assertSearchResults(
- "src/bug73112/A.java bug73112.A.fieldA73112a [fieldA73112a]\n" +
- "src/bug73112/A.java bug73112.A.fieldA73112b [fieldA73112b]\n" +
- "src/bug73112/A.java bug73112.A.fieldA73112c [fieldA73112c]\n" +
- "src/bug73112/A.java bug73112.A.fieldA73112c [fieldA73112a]\n" +
- "src/bug73112/A.java bug73112.A.fieldA73112c [fieldA73112b]\n" +
- "src/bug73112/A.java bug73112.A.fieldA73112d [fieldA73112d]",
- resultCollector);
-}
-public void testFieldReferenceBug73112b() throws CoreException {
- JavaSearchResultCollector resultCollector = new JavaSearchResultCollector();
- search(
- "fieldB73112*",
- FIELD,
- ALL_OCCURRENCES,
- getJavaSearchScope(),
- resultCollector);
- assertSearchResults(
- "src/bug73112/B.java bug73112.B.fieldB73112a [fieldB73112a]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112b [fieldB73112b]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112c [fieldB73112c]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112c [fieldB73112a]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112c [fieldB73112b]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112d [fieldB73112d]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112d [fieldB73112c]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112d [fieldB73112a]\n" +
- "src/bug73112/B.java bug73112.B.fieldB73112e [fieldB73112e]",
- resultCollector);
-}
-/**
* Field reference in anonymous class test.
* (regression test for PR 1GL12XE: ITPJCORE:WIN2000 - search: missing field references in inner class)
*/
@@ -2165,21 +2121,6 @@ public void testPackageDeclaration() throws CoreException {
getExternalJCLPath() + " java.lang",
resultCollector);
}
-
-/**
- * Test fix for bug 73551: NPE while searching package declaration
- * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73551">73551</a>
- * @throws CoreException
- */
-public void testPackageDeclarationBug73551() throws CoreException {
- JavaSearchResultCollector result = new JavaSearchResultCollector();
- result.showAccuracy = true;
- IPackageDeclaration packDecl = getCompilationUnit("JavaSearch", "src", "p71267", "Test.java").getPackageDeclaration("p71267");
- search(packDecl, DECLARATIONS, getJavaSearchScope(), result);
- assertSearchResults(
- "src/p71267/Test.java [No source] EXACT_MATCH",
- result);
-}
/**
* Package reference test.
* (regression test for PR 1GK90H4: ITPJCORE:WIN2000 - search: missing package reference)
diff --git a/org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/.classpath b/org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/.classpath
index 643bef8a9c..9990816db7 100644
--- a/org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/.classpath
+++ b/org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/.classpath
@@ -7,7 +7,6 @@
<classpathentry kind="lib" path="full.jar"/>
<classpathentry kind="lib" path="test2.jar"/>
<classpathentry kind="lib" path="test4.jar"/>
- <classpathentry kind="lib" path="test5.jar"/>
<classpathentry kind="lib" path="lib"/>
<classpathentry kind="src" path="src" output="src"/>
<classpathentry kind="var" path="JCL_LIB"/>
diff --git a/org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/test5.jar b/org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/test5.jar
deleted file mode 100644
index 62fc165e30..0000000000
--- a/org.eclipse.jdt.core.tests.model/workspace/AttachSourceTests/test5.jar
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.java b/org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.java
deleted file mode 100644
index d924b1d0e2..0000000000
--- a/org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestInvalid.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package javadoc.testBug73348;
-
-public class TestInvalid {
- /**
- * @return
- * @see Object
- */
- public int foo1(int x) {return 0; }
- /**
- * @return
- * @see Object
- */
- public int foo2(int x) {return 0; }
-}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.java b/org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.java
deleted file mode 100644
index ed049103fe..0000000000
--- a/org.eclipse.jdt.core.tests.model/workspace/Converter/src/javadoc/testBug73348/TestValid.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package javadoc.testBug73348;
-public class TestValid {
- /**
- * @return
- * int
- */
- public int foo1() {return 0; }
- /**
- * @return
- * int
- * @see Object
- */
- public int foo2() {return 0; }
-}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/A.java b/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/A.java
deleted file mode 100644
index 9c51f251b0..0000000000
--- a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/A.java
+++ /dev/null
@@ -1,6 +0,0 @@
-public class A {
- int fieldA73112a = 1, fieldA73112b = new Integer(2).intValue(), fieldA73112c = fieldA73112a + fieldA73112b;
- int fieldA73112d;
-
- public void method(){}
-}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/B.java b/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/B.java
deleted file mode 100644
index d0751f5566..0000000000
--- a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/bug73112/B.java
+++ /dev/null
@@ -1,6 +0,0 @@
-public class B {
- int fieldB73112a, fieldB73112b = 10;
- int fieldB73112c = fieldB73112a + fieldB73112b, fieldB73112d = fieldB73112c + fieldB73112a, fieldB73112e;
-
- public void method(){}
-}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.java b/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.java
deleted file mode 100644
index c039bc4826..0000000000
--- a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/Test.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package p71267;
-
-/**
- * @see p71267
- * @see p71267.Test
- */
-public class Test {
-}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.java b/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.java
deleted file mode 100644
index 3d5335c753..0000000000
--- a/org.eclipse.jdt.core.tests.model/workspace/JavaSearch/src/p71267/q71267/Test.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package p71267.q71267;
-
-/**
- * @see p71267
- * @see p71267.q71267
- * @see p71267.q71267.Test
- */
-public class Test {
- /**
- * @see p71267.q71267
- * @see p71267.q71267.Test#field
- */
- int field;
- /**
- * @see p71267.q71267
- * @see p71267.q71267.Test#method()
- */
- void method() {}
-}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 7bc82be539..a38edc9e4e 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -101,8 +101,8 @@ public class Main implements ProblemSeverities, SuffixConstants {
/**
* Lookup the message with the given ID in this catalog
- * @param id String
- * @return String
+ * @param id
+ * @return
*/
public static String bind(String id) {
return bind(id, (String[]) null);
@@ -111,9 +111,9 @@ public class Main implements ProblemSeverities, SuffixConstants {
/**
* Lookup the message with the given ID in this catalog and bind its
* substitution locations with the given string.
- * @param id String
- * @param binding String
- * @return String
+ * @param id
+ * @param binding
+ * @return
*/
public static String bind(String id, String binding) {
return bind(id, new String[] { binding });
@@ -122,10 +122,10 @@ public class Main implements ProblemSeverities, SuffixConstants {
/**
* Lookup the message with the given ID in this catalog and bind its
* substitution locations with the given strings.
- * @param id String
- * @param binding1 String
- * @param binding2 String
- * @return String
+ * @param id
+ * @param binding1
+ * @param binding2
+ * @return
*/
public static String bind(String id, String binding1, String binding2) {
return bind(id, new String[] { binding1, binding2 });
@@ -134,9 +134,9 @@ public class Main implements ProblemSeverities, SuffixConstants {
/**
* Lookup the message with the given ID in this catalog and bind its
* substitution locations with the given string values.
- * @param id String
- * @param bindings String[]
- * @return String
+ * @param id
+ * @param bindings
+ * @return
*/
public static String bind(String id, String[] bindings) {
if (id == null)
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html
index 7953c123cb..e2447c59bf 100644
--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -35,37 +35,6 @@
</tr>
</table>
-<a name="v_453"></a>
-<p><hr><h1>
-Eclipse Platform Build Notes&nbsp;<br>
-Java Development Tooling Core</h1>
-Eclipse SDK 3.0.1 Build - ? September 2004 - 3.0.2
-<br>Project org.eclipse.jdt.core v_453_R30x
-(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_453_R30x">cvs</a>).
-<h2>
-What's new in this drop</h2>
-<ul>
-</ul>
-
-<h3>Problem Reports Fixed</h3>
-<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73497">73497</a>
-Problem methods don't point to the right position in source
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=74014">74014</a>
-prefix path for source attachements - automatic detection does not seem to work
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73330">73330</a>
-NullPointerException in search
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73995">73995</a>
-[Javadoc] Wrong warning for missing return type description for @return {@inheritDoc}
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73551">73551</a>
-[Search] NPE while searching package declaration
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=71267">71267</a>
-[Search][Javadoc] SearchMatch in class javadoc reported with element of type IImportDeclaration
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73112">73112</a>
-[Search] SearchEngine doesn't find all fields multiple field declarations
-<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=73348">73348</a>
-[Javadoc] Missing description for return tag is not always warned
-
-
<a name="v_452"></a>
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
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 274b4946ad..e575af546b 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
@@ -67,6 +67,7 @@ public class ClassFile
public boolean ownSharedArrays = false; // flag set when header/contents are set to shared arrays
public static final int INNER_CLASSES_SIZE = 5;
public CodeStream codeStream;
+ protected int problemLine; // used to create line number attributes for problem methods
public long targetJDK;
/**
@@ -558,7 +559,6 @@ public class ClassFile
generateCodeAttributeHeader();
codeStream.resetForProblemClinit(this);
String problemString = "" ; //$NON-NLS-1$
- int problemLine = 0;
if (problems != null) {
int max = problems.length;
StringBuffer buffer = new StringBuffer(25);
@@ -591,8 +591,7 @@ public class ClassFile
.scope
.referenceCompilationUnit()
.compilationResult
- .lineSeparatorPositions,
- problemLine);
+ .lineSeparatorPositions);
contents[attributeOffset++] = (byte) (attributeNumber >> 8);
contents[attributeOffset] = (byte) attributeNumber;
}
@@ -621,7 +620,6 @@ public class ClassFile
generateCodeAttributeHeader();
codeStream.reset(method, this);
String problemString = "" ; //$NON-NLS-1$
- int problemLine = 0;
if (problems != null) {
int max = problems.length;
StringBuffer buffer = new StringBuffer(25);
@@ -654,8 +652,7 @@ public class ClassFile
.scope
.referenceCompilationUnit()
.compilationResult
- .lineSeparatorPositions,
- problemLine);
+ .lineSeparatorPositions);
completeMethodInfo(methodAttributeOffset, attributeNumber);
}
@@ -707,7 +704,6 @@ public class ClassFile
generateCodeAttributeHeader();
codeStream.reset(method, this);
String problemString = "" ; //$NON-NLS-1$
- int problemLine = 0;
if (problems != null) {
int max = problems.length;
StringBuffer buffer = new StringBuffer(25);
@@ -744,8 +740,7 @@ public class ClassFile
.scope
.referenceCompilationUnit()
.compilationResult
- .lineSeparatorPositions,
- problemLine);
+ .lineSeparatorPositions);
completeMethodInfo(methodAttributeOffset, attributeNumber);
}
@@ -863,7 +858,7 @@ public class ClassFile
buffer.append("\t" + problem.getMessage() + "\n" ); //$NON-NLS-1$ //$NON-NLS-2$
buffer.insert(0, Util.bind("compilation.unresolvedProblem" )); //$NON-NLS-1$
String problemString = buffer.toString();
- int problemLine = problem.getSourceLineNumber();
+ this.problemLine = problem.getSourceLineNumber();
codeStream.init(this);
codeStream.preserveUnusedLocals = true;
@@ -875,8 +870,7 @@ public class ClassFile
completeCodeAttributeForMissingAbstractProblemMethod(
methodBinding,
codeAttributeOffset,
- compilationResult.lineSeparatorPositions,
- problemLine);
+ compilationResult.lineSeparatorPositions);
completeMethodInfo(methodAttributeOffset, attributeNumber);
}
@@ -887,8 +881,7 @@ public class ClassFile
public void completeCodeAttributeForMissingAbstractProblemMethod(
MethodBinding binding,
int codeAttributeOffset,
- int[] startLineIndexes,
- int problemLine) {
+ int[] startLineIndexes) {
// reinitialize the localContents with the byte modified by the code stream
this.contents = codeStream.bCodeStream;
int localContentsOffset = codeStream.classFileOffset;
@@ -1619,8 +1612,7 @@ public class ClassFile
*/
public void completeCodeAttributeForClinit(
int codeAttributeOffset,
- int[] startLineIndexes,
- int problemLine) {
+ int[] startLineIndexes) {
// reinitialize the contents with the byte modified by the code stream
this.contents = codeStream.bCodeStream;
int localContentsOffset = codeStream.classFileOffset;
@@ -1734,8 +1726,7 @@ public class ClassFile
AbstractMethodDeclaration method,
MethodBinding binding,
int codeAttributeOffset,
- int[] startLineIndexes,
- int problemLine) {
+ int[] startLineIndexes) {
// reinitialize the localContents with the byte modified by the code stream
this.contents = codeStream.bCodeStream;
int localContentsOffset = codeStream.classFileOffset;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index 40503c6c29..7170bbf40d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -326,8 +326,8 @@ public class ConstructorDeclaration extends AbstractMethodDeclaration {
* Given most constructors aren't, we only allocate the visited list
* lazily.
*
- * @param visited ArrayList
- * @return String
+ * @param visited
+ * @return
*/
public boolean isRecursive(ArrayList visited) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java
index 4633195db6..8a53e1bac7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java
@@ -16,7 +16,6 @@ import org.eclipse.jdt.internal.compiler.lookup.*;
public class JavadocReturnStatement extends ReturnStatement {
public char[] description;
- public boolean empty = true;
public JavadocReturnStatement(int s, int e, char[] descr) {
super(null, s, e);
@@ -35,8 +34,6 @@ public class JavadocReturnStatement extends ReturnStatement {
: VoidBinding;
if (methodType == null || methodType == VoidBinding) {
scope.problemReporter().javadocUnexpectedTag(this.sourceStart, this.sourceEnd);
- } else if (this.empty) {
- scope.problemReporter().javadocInvalidTag(this.sourceStart, this.sourceEnd);
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
index ba54dd0819..ca99505046 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
@@ -15,7 +15,6 @@ import java.util.List;
import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.core.compiler.InvalidInputException;
-import org.eclipse.jdt.internal.compiler.ast.JavadocReturnStatement;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
/**
@@ -61,9 +60,6 @@ public abstract class AbstractCommentParser {
protected boolean lineStarted = false, inlineTagStarted = false;
protected int kind;
protected int[] lineEnds;
-
- // Store when return tag is parsed
- protected int returnTagPtr= -2;
// Private fields
private int currentTokenType = -1;
@@ -113,7 +109,7 @@ public abstract class AbstractCommentParser {
readChar(); // first '*'
char nextCharacter= readChar(); // second '*'
- // Init variables
+ // Init local variables
this.astLengthPtr = -1;
this.astPtr = -1;
this.currentTokenType = -1;
@@ -123,7 +119,6 @@ public abstract class AbstractCommentParser {
this.returnStatement = null;
this.inherited = false;
this.deprecated = false;
- this.returnTagPtr = -2;
this.linePtr = getLineNumber(javadocStart);
this.lastLinePtr = getLineNumber(javadocEnd);
this.lineEnd = (this.linePtr == this.lastLinePtr) ? this.endComment : this.scanner.getLineEnd(this.linePtr);
@@ -196,14 +191,6 @@ public abstract class AbstractCommentParser {
this.scanner.resetTo(this.index, this.endComment);
this.currentTokenType = -1; // flush token cache at line begin
try {
- // In case of previous return tag, set it to not empty if parsing an inline tag
- if (this.kind == COMPIL_PARSER && this.returnTagPtr != -2 && this.returnStatement != null) {
- this.returnTagPtr = -2;
- JavadocReturnStatement javadocReturn = (JavadocReturnStatement) this.returnStatement;
- javadocReturn.empty = javadocReturn.empty && !this.inlineTagStarted;
- }
-
- // Read tag name
int token = readTokenAndConsume();
this.tagSourceStart = this.scanner.getCurrentTokenStartPosition();
this.tagSourceEnd = this.scanner.getCurrentTokenEndPosition();
@@ -302,14 +289,13 @@ public abstract class AbstractCommentParser {
break;
case TerminalTokens.TokenNamereturn :
valid = parseReturn();
- /* verify characters after return tag (we're expecting text description)
+ // verify characters after return tag (we're expecting text description)
if(!verifyCharsAfterReturnTag(this.index)) {
if (this.sourceParser != null) {
int end = this.starPosition == -1 || this.lineEnd<this.starPosition ? this.lineEnd : this.starPosition;
this.sourceParser.problemReporter().javadocInvalidTag(this.tagSourceStart, end);
}
}
- */
break;
case TerminalTokens.TokenNamethrows :
valid = parseThrows(true);
@@ -1332,28 +1318,40 @@ public abstract class AbstractCommentParser {
/*
* Verify that some text exists after a @return tag. Text must be different than
* end of comment which may be preceeding by several '*' chars.
- *
+ */
private boolean verifyCharsAfterReturnTag(int startPosition) {
// Whitespace or inline tag closing brace
int previousPosition = this.index;
char ch = readChar();
- this.starPosition = -1;
- while (Character.isWhitespace(ch) || ch == '*') {
+ boolean malformed = true;
+ while (Character.isWhitespace(ch)) {
+ malformed = false;
previousPosition = this.index;
- if (ch == '*') {
- // valid whatever the number of star before last '/'
- this.starPosition = previousPosition;
- }
ch = readChar();
}
- // Look at possible end of comment
- if (this.starPosition >= startPosition) { // valid only if a star was previous character
- return ch == '/';
+ // End of comment
+ this.starPosition = -1;
+ nextChar: while (this.index<this.source.length) {
+ switch (ch) {
+ case '*':
+ // valid whatever the number of star before last '/'
+ this.starPosition = previousPosition;
+ break;
+ case '/':
+ if (this.starPosition >= startPosition) { // valid only if a star was previous character
+ return false;
+ }
+ default :
+ // valid if any other character is encountered, even white spaces
+ this.index = startPosition;
+ return !malformed;
+
+ }
+ previousPosition = this.index;
+ ch = readChar();
}
-
- // valid if next encountered is not, even white spaces
this.index = startPosition;
- return ch != '@';
+ return false;
}
/*
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
index 58727cbf1d..7786636fff 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java
@@ -271,7 +271,6 @@ public class JavadocParser extends AbstractCommentParser {
protected boolean parseReturn() {
if (this.returnStatement == null) {
this.returnStatement = createReturnStatement();
- this.returnTagPtr = this.astPtr;
return true;
}
if (this.sourceParser != null) this.sourceParser.problemReporter().javadocDuplicatedReturnTag(
@@ -371,34 +370,7 @@ public class JavadocParser extends AbstractCommentParser {
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#pushText(int, int)
*/
protected void pushText(int start, int end) {
- // In case of previous return tag, verify that text make it not empty
- if (this.returnTagPtr != -2 && this.returnStatement != null) {
- int position = this.index;
- this.index = start;
- boolean empty = true;
- boolean star = false;
- char ch = readChar();
- // Look for first character other than white or '*'
- if (Character.isWhitespace(ch) || start>(this.tagSourceEnd+1)) {
- while (this.index <= end && empty) {
- if (!star) {
- empty = Character.isWhitespace(ch) || ch == '*';
- star = ch == '*';
- } else if (ch != '*') {
- empty = false;
- break;
- }
- ch = readChar();
- }
- }
- // Store result in previous return tag
- ((JavadocReturnStatement)this.returnStatement).empty = empty;
- // Reset position and current ast ptr if we are on a different tag than previous return one
- this.index = position;
- if (this.returnTagPtr != this.astPtr) {
- this.returnTagPtr = -2;
- }
- }
+ // compiler does not matter of text
}
/*
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
index 2a2fe4a09b..c642c18f20 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
@@ -689,10 +689,10 @@ public class ASTParser {
}
/**
- * @param monitor IProgressMonitor
- * @param compilationUnitDeclaration CompilationUnitDeclaration
- * @param source char[]
- * @return ASTNode
+ * @param monitor
+ * @param compilationUnitDeclaration
+ * @param source
+ * @return
*/
private ASTNode convert(IProgressMonitor monitor, CompilationUnitDeclaration compilationUnitDeclaration, char[] source, boolean needToResolveBindings) {
BindingResolver resolver = null;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
index 2a5ed8f465..b1476ee7d8 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
@@ -209,8 +209,8 @@ import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
/**
* Creates a string that represents the given number of indents (can be spaces or tabs..)
- * @param indent int
- * @return String
+ * @param indent
+ * @return
*/
public String createIndentString(int indent) {
StringBuffer buf= new StringBuffer(indent * this.singleIndentString.length());
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/Indents.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/Indents.java
index 046c4ee998..540481b561 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/Indents.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/Indents.java
@@ -32,8 +32,8 @@ public class Indents {
/**
* Indent char is a space char but not a line delimiters.
* <code>== Character.isWhitespace(ch) && ch != '\n' && ch != '\r'</code>
- * @param ch char
- * @return boolean
+ * @param ch
+ * @return
*/
public static boolean isIndentChar(char ch) {
return Character.isWhitespace(ch) && !isLineDelimiterChar(ch);
@@ -78,13 +78,13 @@ public class Indents {
}
/**
- * Removes the given number of indents from the line. Asserts that the given line
+ * Removes the given number of idents from the line. Asserts that the given line
* has the requested number of indents. If <code>indentsToRemove <= 0</code>
* the line is returned.
* @param line The line to trim the indent
* @param indentsToRemove The indent level to remove
* @param tabWidth The current tab width
- * @return String The trimmed string
+ * @return
*/
public static String trimIndent(String line, int indentsToRemove, int tabWidth) {
if (line == null || indentsToRemove <= 0)
@@ -197,8 +197,8 @@ public class Indents {
* @param codeIndentLevel The indent level of the code
* @param tabWidth The current tab width setting
* @param newIndent The new Indent string
- * @param lineDelim The current line delimiter
- * @return String The changed string
+ * @param lineDelim THe current line delimiter
+ * @return
*/
public static String changeIndent(String code, int codeIndentLevel, int tabWidth, String newIndent, String lineDelim) {
try {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java
index 3cdda7bdea..584b46a202 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEventStore.java
@@ -374,9 +374,9 @@ public final class RewriteEventStore {
/**
* Kind is either ORIGINAL, NEW, or BOTH
- * @param value Object
- * @param kind int
- * @return RewriteEvent
+ * @param value
+ * @param kind
+ * @return
*/
public RewriteEvent findEvent(Object value, int kind) {
for (int i= 0; i < this.events.size(); i++) {
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementRequestorAdapter.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementRequestorAdapter.java
index c6ad71e316..90b43ef64d 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementRequestorAdapter.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementRequestorAdapter.java
@@ -218,7 +218,7 @@ public class SourceElementRequestorAdapter implements ISourceElementRequestor {
}
/**
- * @see ISourceElementRequestor#exitField(int, int, int)
+ * @see ISourceElementRequestor#exitField(int)
*/
public void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd) {
// default implementation: do nothing
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
index 8e4b2c7372..d969ade44d 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SourceMapper.java
@@ -387,15 +387,14 @@ public class SourceMapper
zip = manager.getZipFile(this.sourcePath);
for (Enumeration entries = zip.entries(); entries.hasMoreElements(); ) {
ZipEntry entry = (ZipEntry) entries.nextElement();
- String entryName;
- if (!entry.isDirectory() && Util.isJavaFileName(entryName = entry.getName())) {
- IPath path = new Path(entryName);
+ if (!entry.isDirectory()) {
+ IPath path = new Path(entry.getName());
int segmentCount = path.segmentCount();
if (segmentCount > 1) {
loop: for (int i = 0, max = path.segmentCount() - 1; i < max; i++) {
if (firstLevelPackageNames.contains(path.segment(i))) {
this.rootPaths.add(path.uptoSegment(i).toString());
- // don't break here as this path could contain other first level package names (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=74014)
+ break loop;
}
if (i == max - 1 && containsADefaultPackage) {
this.rootPaths.add(path.uptoSegment(max).toString());
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
index 53ed3aefab..33e7a622aa 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
@@ -744,8 +744,8 @@ private void setEnvironment(LookupEnvironment lookupEnvironment, HierarchyBuilde
/**
* Set the focus type (ie. the type that this resolver is computing the hierarch for.
* Returns the binding of this focus type or null if it could not be found.
- * @param compoundName char[]
- * @return ReferenceBinding
+ * @param compoundName
+ * @return
*/
public ReferenceBinding setFocusType(char[][] compoundName) {
if (compoundName == null || this.lookupEnvironment == null) return null;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMCompilationUnit.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMCompilationUnit.java
index 97b2cdebf8..aab682b02f 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMCompilationUnit.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/jdom/DOMCompilationUnit.java
@@ -159,7 +159,7 @@ void normalize(ILineStartFinder finder) {
initalizeHeader();
}
/**
- * @see IDOMCompilationUnit#setHeader(String)
+ * @see IDOMCompilationUnit@setHeader(String)
*/
public void setHeader(String comment) {
fHeader= comment;
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java
index 2878e2b381..e263d9e611 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/AddJarFileToIndex.java
@@ -158,12 +158,6 @@ class AddJarFileToIndex extends IndexRequest {
// index already existed: recreate it so that we forget about previous entries
SearchParticipant participant = SearchEngine.getDefaultSearchParticipant();
index = manager.recreateIndex(this.containerPath);
- if (index == null) {
- // failed to recreate index, see 73330
- manager.removeIndex(this.containerPath);
- return false;
- }
-
for (Enumeration e = zip.entries(); e.hasMoreElements();) {
if (this.isCancelled) {
if (JobManager.VERBOSE)
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
index 7d6be42cb1..99427d8661 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
@@ -1027,8 +1027,6 @@ public SearchMatch newDeclarationMatch(
return new MethodDeclarationMatch(element, accuracy, offset, length, participant, resource);
case IJavaElement.LOCAL_VARIABLE:
return new LocalVariableDeclarationMatch(element, accuracy, offset, length, participant, resource);
- case IJavaElement.PACKAGE_DECLARATION:
- return new PackageDeclarationMatch(element, accuracy, offset, length, participant, resource);
default:
return null;
}
@@ -1409,6 +1407,32 @@ protected void reportMatching(CompilationUnitDeclaration unit, boolean mustResol
? unit.scope.getTypeOrPackage(CharOperation.subarray(importRef.tokens, 0, importRef.tokens.length))
: unit.scope.getTypeOrPackage(importRef.tokens);
this.patternLocator.matchLevelAndReportImportRef(importRef, binding, this);
+ } else {
+ if (node instanceof JavadocSingleTypeReference) {
+ // special case for javadoc single type reference
+ JavadocSingleTypeReference singleRef = (JavadocSingleTypeReference) node;
+ if (singleRef.packageBinding != null) {
+ char[][] tokens = new char[][] { singleRef.token };
+ long[] positions = new long[] { (((long) singleRef.sourceStart) << 32) + singleRef.sourceEnd };
+ int tagStart = singleRef.tagSourceStart;
+ int tagEnd = singleRef.tagSourceEnd;
+ JavadocImportReference importRef = new JavadocImportReference(tokens, positions, tagStart, tagEnd);
+ this.patternLocator.matchLevelAndReportImportRef(importRef, singleRef.packageBinding, this);
+ continue;
+ }
+ } else if (node instanceof JavadocQualifiedTypeReference) {
+ // special case for javadoc qualified type reference
+ JavadocQualifiedTypeReference qualifRef = (JavadocQualifiedTypeReference) node;
+ if (qualifRef.packageBinding != null) {
+ char[][] tokens = qualifRef.tokens;
+ long[] positions = qualifRef.sourcePositions;
+ int tagStart = qualifRef.tagSourceStart;
+ int tagEnd = qualifRef.tagSourceEnd;
+ JavadocImportReference importRef = new JavadocImportReference(tokens, positions, tagStart, tagEnd);
+ this.patternLocator.matchLevelAndReportImportRef(importRef, qualifRef.packageBinding, this);
+ continue;
+ }
+ }
}
nodeSet.addMatch(node, this.patternLocator.resolveLevel(node));
}
@@ -1474,9 +1498,7 @@ protected void reportMatching(FieldDeclaration field, TypeDeclaration type, IJav
}
if (typeInHierarchy) {
- // limit scan to end part position for multiple fields declaration (see bug 73112)
- int end = field.endPart2Position==0 ? field.declarationSourceEnd : field.endPart2Position;
- ASTNode[] nodes = nodeSet.matchingNodes(field.declarationSourceStart, end);
+ ASTNode[] nodes = nodeSet.matchingNodes(field.declarationSourceStart, field.declarationSourceEnd);
if (nodes != null) {
if ((this.matchContainer & PatternLocator.FIELD_CONTAINER) == 0) {
for (int i = 0, l = nodes.length; i < l; i++)
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java
index d6f4015018..77d76a99f4 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PackageReferenceLocator.java
@@ -179,11 +179,6 @@ protected void matchReportReference(ASTNode reference, IJavaElement element, int
QualifiedTypeReference qTypeRef = (QualifiedTypeReference) reference;
positions = qTypeRef.sourcePositions;
typeBinding = qTypeRef.resolvedType;
- } else if (reference instanceof JavadocSingleTypeReference) {
- JavadocSingleTypeReference jsTypeRef = (JavadocSingleTypeReference) reference;
- positions = new long[1];
- positions[0] = (((long)jsTypeRef.sourceStart) << 32) + jsTypeRef.sourceEnd;
- typeBinding = jsTypeRef.resolvedType;
}
if (typeBinding instanceof ArrayBinding)
typeBinding = ((ArrayBinding) typeBinding).leafComponentType;
@@ -209,18 +204,6 @@ protected int referenceType() {
return IJavaElement.PACKAGE_FRAGMENT;
}
public int resolveLevel(ASTNode node) {
- if (node instanceof JavadocQualifiedTypeReference) {
- JavadocQualifiedTypeReference qualifRef = (JavadocQualifiedTypeReference) node;
- if (qualifRef.packageBinding != null)
- return resolveLevel(qualifRef.packageBinding);
- return resolveLevel(qualifRef.resolvedType);
- }
- if (node instanceof JavadocSingleTypeReference) {
- JavadocSingleTypeReference singleRef = (JavadocSingleTypeReference) node;
- if (singleRef.packageBinding != null)
- return resolveLevel(singleRef.packageBinding);
- return IMPOSSIBLE_MATCH;
- }
if (node instanceof QualifiedTypeReference)
return resolveLevel(((QualifiedTypeReference) node).resolvedType);
if (node instanceof QualifiedNameReference)

Back to the top