update jdt.core + tests to v_C19
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java
index e68746f..f906062 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachedJavadocTests.java
@@ -86,6 +86,7 @@
suite.addTest(new AttachedJavadocTests("testBug334652_3"));
suite.addTest(new AttachedJavadocTests("testBug334652_4"));
suite.addTest(new AttachedJavadocTests("testBug354766"));
+ suite.addTest(new AttachedJavadocTests("testBug354766_2"));
return suite;
}
@@ -1004,4 +1005,43 @@
this.project.setRawClasspath(entries, null);
}
}
+ //https://bugs.eclipse.org/bugs/show_bug.cgi?id=354766
+ public void testBug354766_2() throws CoreException, IOException {
+ IClasspathEntry[] entries = this.project.getRawClasspath();
+
+ try {
+ IClasspathAttribute attribute =
+ JavaCore.newClasspathAttribute(
+ IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME,
+ "jar:platform:/resource/AttachedJavadocProject/bug354766_doc.zip!/");
+ IClasspathEntry newEntry = JavaCore.newLibraryEntry(new Path("/AttachedJavadocProject/bug354766.jar"), null, null, null, new IClasspathAttribute[] { attribute}, false);
+ this.project.setRawClasspath(new IClasspathEntry[]{newEntry}, null);
+ this.project.getResolvedClasspath(false);
+
+ IPackageFragmentRoot jarRoot = this.project.getPackageFragmentRoot(getFile("/AttachedJavadocProject/bug354766.jar"));
+ final IType type = jarRoot.getPackageFragment("com.test").getClassFile("PublicAbstractClass$InnerFinalException.class").getType();
+ IMethod method = type.getMethod("InnerFinalException", new String[] { "Lcom.test.PublicAbstractClass;"});
+ assertNotNull(method);
+ assertTrue("Does not exist", method.exists());
+
+ String javadoc = method.getAttachedJavadoc(null);
+ assertNotNull(javadoc);
+ assertEquals(
+ "Wrong contents",
+ "<H3>\r\n" +
+ "PublicAbstractClass.InnerFinalException</H3>\r\n" +
+ "<PRE>\r\n" +
+ "public <B>PublicAbstractClass.InnerFinalException</B>()</PRE>\r\n" +
+ "<DL>\r\n" +
+ "<DD>javadoc for InnerFinalException()\r\n" +
+ "<P>\r\n" +
+ "</DL>\r\n" +
+ "\r\n" +
+ "<!-- ============ METHOD DETAIL ========== -->\r\n" +
+ "\r\n",
+ javadoc);
+ } finally {
+ this.project.setRawClasspath(entries, null);
+ }
+ }
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
index 5f0c5bf..fcbe28f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
@@ -7,6 +7,8 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Terry Parker <tparker@google.com> - DeltaProcessor misses state changes in archive files, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=357425,
+ * Fup of 357425: ensure all reported regressions are witnessed by tests, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=361922
*******************************************************************************/
package org.eclipse.jdt.core.tests.model;
@@ -4211,12 +4213,14 @@
public void testTransitionFromInvalidToValidJar() throws CoreException, IOException {
String transitioningJarName = "transitioningJar.jar";
String transitioningJar = getExternalPath() + transitioningJarName;
- String nonExistingJar = getExternalPath() + "nonExisting.jar";
+ String invalidJar = getExternalPath() + "invalidJar.jar";
IClasspathEntry transitioningEntry = JavaCore.newLibraryEntry(new Path(transitioningJar), null, null);
- IClasspathEntry nonExistingEntry = JavaCore.newLibraryEntry(new Path(nonExistingJar), null, null);
+ IClasspathEntry nonExistingEntry = JavaCore.newLibraryEntry(new Path(invalidJar), null, null);
try {
- IJavaProject proj = createJavaProject("P", new String[] {}, new String[] {transitioningJar, nonExistingJar}, "bin");
+ Util.createFile(transitioningJar, "");
+ Util.createFile(invalidJar, "");
+ IJavaProject proj = createJavaProject("P", new String[] {}, new String[] {transitioningJar, invalidJar}, "bin");
IJavaModelStatus status1 = ClasspathEntry.validateClasspathEntry(proj, transitioningEntry, false, false);
IJavaModelStatus status2 = ClasspathEntry.validateClasspathEntry(proj, nonExistingEntry, false, false);