Skip to content

Commit

Permalink
Merge "ClasspathUpdater: avoid JavaElement.newNotPresentException"
Browse files Browse the repository at this point in the history
  • Loading branch information
haubi authored and Gerrit Code Review @ Eclipse.org committed Dec 1, 2022
2 parents e8b92b8 + 13d17e1 commit bb579e5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.pde.core.plugin.IPluginModelBase;
import org.eclipse.pde.core.plugin.PluginRegistry;
import org.eclipse.pde.internal.core.ClasspathComputer;
Expand Down Expand Up @@ -72,7 +73,7 @@ public void update(TaskingLog console, IProgressMonitor monitor) {
final String bundleName = pd.getBundleName();
try {
IProject project = pd.getProject();
if (project == null) {
if (project == null || !JavaProject.hasJavaNature(project)) {
console.warn("skipping " + bundleName);
continue;
}
Expand Down

0 comments on commit bb579e5

Please sign in to comment.