View | Details | Raw Unified | Return to bug 252392
Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/ClasspathEntry.java (-11 / +3 lines)
Lines 1829-1845 Link Here
1829
			case IClasspathEntry.CPE_LIBRARY :
1829
			case IClasspathEntry.CPE_LIBRARY :
1830
				path = ClasspathEntry.resolveDotDot(path);
1830
				path = ClasspathEntry.resolveDotDot(path);
1831
				
1831
				
1832
				// resolve Class-Path: in manifest
1832
				// do not validate entries from Class-Path: in manifest
1833
				IPath[] chainedJars = ClasspathEntry.resolvedChainedLibraries(path);
1833
				// (these entries are considered optional since the user cannot act on them)
1834
				for (int i = 0, length = chainedJars.length; i < length; i++) {
1834
				// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=252392
1835
					IPath chainedJar = chainedJars[i];
1836
					IJavaModelStatus status = validateLibraryEntry(chainedJar, project, null/*don't check source attachment*/, null/*force computing of entryPathMsg*/);
1837
					if (!status.isOK()) {
1838
						if (referredByContainer && status.getCode() == IJavaModelStatusConstants.INVALID_CLASSPATH)
1839
							continue; // ignore this entry (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=250946 )
1840
						return status;
1841
					}
1842
				}
1843
				
1835
				
1844
				IJavaModelStatus status = validateLibraryEntry(path, project, checkSourceAttachment ? entry.getSourceAttachmentPath() : null, entryPathMsg);
1836
				IJavaModelStatus status = validateLibraryEntry(path, project, checkSourceAttachment ? entry.getSourceAttachmentPath() : null, entryPathMsg);
1845
				if (!status.isOK())
1837
				if (!status.isOK())
(-)src/org/eclipse/jdt/core/tests/model/ClasspathTests.java (-6 / +9 lines)
Lines 3111-3117 Link Here
3111
	}
3111
	}
3112
}
3112
}
3113
/*
3113
/*
3114
 * Ensures that a marker is created for incorrect extra libraries in the Class-Path: clause of a jar
3114
 * Ensures that a marker is not created for incorrect extra libraries in the Class-Path: clause of a jar
3115
 * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=252392 )
3115
 */
3116
 */
3116
public void testExtraLibraries06() throws Exception {
3117
public void testExtraLibraries06() throws Exception {
3117
	try {
3118
	try {
Lines 3125-3131 Link Here
3125
			JavaCore.VERSION_1_4);
3126
			JavaCore.VERSION_1_4);
3126
		assertMarkers(
3127
		assertMarkers(
3127
			"Unexpected markers",
3128
			"Unexpected markers",
3128
			"Project \'P\' is missing required library: \'lib2.jar\'",
3129
			"",
3129
			p);
3130
			p);
3130
	} finally {
3131
	} finally {
3131
		deleteProject("P");
3132
		deleteProject("P");
Lines 3184-3190 Link Here
3184
	}
3185
	}
3185
}
3186
}
3186
/*
3187
/*
3187
 * Ensures that a marker is created for incorrect extra libraries in the Class-Path: clause of an external jar
3188
 * Ensures that a marker is not created for incorrect extra libraries in the Class-Path: clause of an external jar
3189
 * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=252392 )
3188
 */
3190
 */
3189
public void testExtraLibraries09() throws Exception {
3191
public void testExtraLibraries09() throws Exception {
3190
	try {
3192
	try {
Lines 3198-3204 Link Here
3198
			JavaCore.VERSION_1_4);
3200
			JavaCore.VERSION_1_4);
3199
		assertMarkers(
3201
		assertMarkers(
3200
			"Unexpected markers",
3202
			"Unexpected markers",
3201
			"Project \'P\' is missing required library: \'"+ getExternalPath() + "lib2.jar\'",
3203
			"",
3202
			p);
3204
			p);
3203
	} finally {
3205
	} finally {
3204
		deleteProject("P");
3206
		deleteProject("P");
Lines 3207-3213 Link Here
3207
	}
3209
	}
3208
}
3210
}
3209
/*
3211
/*
3210
 * Ensures that a marker is created for incorrect extra libraries in the Class-Path: clause of an external jar
3212
 * Ensures that a marker is not created for incorrect extra libraries in the Class-Path: clause of an external jar
3213
 * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=252392 )
3211
 */
3214
 */
3212
public void testExtraLibraries10() throws Exception {
3215
public void testExtraLibraries10() throws Exception {
3213
	try {
3216
	try {
Lines 3227-3233 Link Here
3227
		refreshExternalArchives(p);
3230
		refreshExternalArchives(p);
3228
		assertMarkers(
3231
		assertMarkers(
3229
			"Unexpected markers",
3232
			"Unexpected markers",
3230
			"Project \'P\' is missing required library: \'"+ getExternalPath() + "lib2.jar\'",
3233
			"",
3231
			p);
3234
			p);
3232
	} finally {
3235
	} finally {
3233
		deleteProject("P");
3236
		deleteProject("P");

Return to bug 252392