Skip to content

Commit

Permalink
Only consider existing artifacts for the classpath
Browse files Browse the repository at this point in the history
Currently only if the artifact file is null it is not considered but if
the file does not exits JDT complains. It even seems there was once in a
time such a check but it is disabled, this is an attempt to check if we
can reenable it again.
  • Loading branch information
laeubi authored and HannesWell committed Feb 17, 2024
1 parent 94fa546 commit 2bf3489
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void addClasspathEntries(IClasspathDescriptor classpath, IMavenProjectFacade fac

} else {
File artifactFile = a.getFile();
if(artifactFile != null /*&& artifactFile.canRead()*/) {
if(artifactFile != null && artifactFile.exists()) {
entry = classpath.addLibraryEntry(IPath.fromOSString(artifactFile.getAbsolutePath()));
entry.setClasspathAttribute(IClasspathManager.TEST_ATTRIBUTE, addTestFlag ? "true" : null);
}
Expand Down

0 comments on commit 2bf3489

Please sign in to comment.