View | Details | Raw Unified | Return to bug 154693 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/builder/CopyResourceTests.java (+24 lines)
Lines 268-271 Link Here
268
		expectingNoProblems();
268
		expectingNoProblems();
269
		expectingPresenceOf(bin.append("z.txt")); //$NON-NLS-1$
269
		expectingPresenceOf(bin.append("z.txt")); //$NON-NLS-1$
270
	}
270
	}
271
272
	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=154693
273
	public void testBug154693() throws JavaModelException {
274
		IPath projectPath = env.addProject("P9"); //$NON-NLS-1$
275
		env.removePackageFragmentRoot(projectPath, ""); //$NON-NLS-1$
276
		IPath src = env.addPackageFragmentRoot(projectPath, "src"); //$NON-NLS-1$
277
		env.setOutputFolder(projectPath, "bin"); //$NON-NLS-1$
278
		env.addExternalJars(projectPath, Util.getJavaClassLibs());
279
280
		org.eclipse.jdt.core.IJavaProject p = env.getJavaProject("P9");
281
		java.util.Map options = p.getOptions(true);
282
		options.put(org.eclipse.jdt.core.JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER, ".svn/"); //$NON-NLS-1$
283
		p.setOptions(options);
284
285
		IPath folder = env.addFolder(src, "p");
286
		env.addFolder(folder, ".svn");
287
		env.addFile(folder, "A.java", "package p;\nclass A{}"); //$NON-NLS-1$ //$NON-NLS-2$
288
289
		fullBuild();
290
		expectingNoProblems();
291
		expectingNoPresenceOf(new IPath[] {
292
			projectPath.append("bin/p/.svn") //$NON-NLS-1$
293
		});
294
	}
271
}
295
}
(-)model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java (-1 / +7 lines)
Lines 243-249 Link Here
243
							if (!isOutputFolder) {
243
							if (!isOutputFolder) {
244
								if (folderPath == null)
244
								if (folderPath == null)
245
									folderPath = proxy.requestFullPath();
245
									folderPath = proxy.requestFullPath();
246
								createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);
246
								String packageName = folderPath.lastSegment();
247
								if (packageName.length() > 0) {
248
									String sourceLevel = javaBuilder.javaProject.getOption(JavaCore.COMPILER_SOURCE, true);
249
									String complianceLevel = javaBuilder.javaProject.getOption(JavaCore.COMPILER_COMPLIANCE, true);
250
									if (JavaConventions.validatePackageName(packageName, sourceLevel, complianceLevel).getSeverity() != IStatus.ERROR)
251
										createFolder(folderPath.removeFirstSegments(segmentCount), outputFolder);
252
								}
247
							}
253
							}
248
					}
254
					}
249
					return true;
255
					return true;

Return to bug 154693