diff --git a/src/main/java/io/openliberty/tools/intellij/LibertyExplorer.java b/src/main/java/io/openliberty/tools/intellij/LibertyExplorer.java index 2a4c2afb2..631d83bf9 100644 --- a/src/main/java/io/openliberty/tools/intellij/LibertyExplorer.java +++ b/src/main/java/io/openliberty/tools/intellij/LibertyExplorer.java @@ -314,13 +314,15 @@ public Component getTreeCellRendererComponent( } // select icon for node based on project type - LibertyModuleNode moduleNode = (LibertyModuleNode) value; - if (moduleNode.isGradleProjectType()) { - setIcon(LibertyPluginIcons.gradleIcon); - } else if (moduleNode.isMavenProjectType()) { - setIcon(LibertyPluginIcons.mavenIcon); - } else { - setIcon(LibertyPluginIcons.libertyIcon); + if (value instanceof LibertyModuleNode) { + LibertyModuleNode moduleNode = (LibertyModuleNode) value; + if (moduleNode.isGradleProjectType()) { + setIcon(LibertyPluginIcons.gradleIcon); + } else if (moduleNode.isMavenProjectType()) { + setIcon(LibertyPluginIcons.mavenIcon); + } else { + setIcon(LibertyPluginIcons.libertyIcon); + } } return this;