Skip to content

Commit 7eaa3c0

Browse files
kysmith-csglaeubi
authored andcommitted
Fix bad casting causing all entries to be unknown
1 parent 5132849 commit 7eaa3c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/preferences/LifecycleMappingsViewer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ String getSourcelabel(MojoExecutionKey execution, List<IPluginExecutionMetadata>
444444
LinkedHashSet<String> sources = new LinkedHashSet<>();
445445
if(mappings != null && !mappings.isEmpty()) {
446446
for(IPluginExecutionMetadata mapping : mappings) {
447-
if(mapping instanceof LifecycleMappingMetadataSource metadata) {
447+
LifecycleMappingMetadataSource metadata = ((PluginExecutionMetadata) mapping).getSource();
448+
if(metadata != null) {
448449
Object source = metadata.getSource();
449450
if(source instanceof String s) {
450451
sources.add(s);

0 commit comments

Comments
 (0)