Skip to content

Commit 4655823

Browse files
committed
Prevent NPE in case no provider wiring is available
In some case when a provider wiring is not available there can be a NPE when setting the PDE classpath, this now checks if a provider wiring is available before access the provider.
1 parent e839691 commit 4655823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathUtilCore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private static Stream<IClasspathEntry> getRequiredByDescription(BundleDescriptio
128128
}
129129

130130
List<BundleWire> wires = wiring.getRequiredWires(PackageNamespace.PACKAGE_NAMESPACE);
131-
return wires.stream().map(wire -> {
131+
return wires.stream().filter(wire -> wire.getProviderWiring() != null).map(wire -> {
132132
return wire.getProvider();
133133
}).distinct().flatMap(provider -> {
134134
IPluginModelBase model = PluginRegistry.findModel(provider);

0 commit comments

Comments
 (0)