From 6c6b34b08035b712c873f8bda781870570b8c999 Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Mon, 6 Jan 2014 11:01:50 +0000 Subject: [PATCH] If it's not a pluginDescriptor then it's not equals and we should not throw a CCE --- .../org/apache/maven/plugin/descriptor/PluginDescriptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java index 02b19c807f..460c401ae8 100644 --- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java +++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java @@ -272,7 +272,7 @@ public class PluginDescriptor return true; } - return getId().equals( ( (PluginDescriptor) object ).getId() ); + return object instanceof PluginDescriptor && getId().equals( ( (PluginDescriptor) object ).getId() ); } public int hashCode()