Skip to content

Commit 9785675

Browse files
committed
Check for default output location if not specified explicitly (eclipse-jdt#4745)
Fixes eclipse-jdt#4745
1 parent a1d188b commit 9785675

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder

org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,12 +899,17 @@ protected int checkOutputFolders(IJavaProject project, int buildKind) {
899899
return buildKind;
900900
}
901901
try {
902+
boolean checkDefault = true;
902903
IWorkspaceRoot root = project.getProject().getWorkspace().getRoot();
903904
for (IClasspathEntry entry : project.getRawClasspath()) {
904905
if (entry.getEntryKind() != IClasspathEntry.CPE_SOURCE) {
905906
continue;
906907
}
907908
IPath outputLocation = entry.getOutputLocation();
909+
if (outputLocation == null && checkDefault) {
910+
outputLocation = project.getOutputLocation();
911+
checkDefault = false;
912+
}
908913
if (outputLocation != null) {
909914
IContainer outputContainer;
910915
if(outputLocation.segmentCount() == 1) {

0 commit comments

Comments
 (0)