You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by st...@apache.org on 2014/01/06 12:25:29 UTC

[16/21] git commit: If it's not a pluginDescriptor then it's not equals and we should not throw a CCE

If it's not a pluginDescriptor then it's not equals and we should not throw a CCE


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/6c6b34b0
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/6c6b34b0
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/6c6b34b0

Branch: refs/heads/master
Commit: 6c6b34b08035b712c873f8bda781870570b8c999
Parents: e2b7ea2
Author: Stephen Connolly <st...@gmail.com>
Authored: Mon Jan 6 11:01:50 2014 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Mon Jan 6 11:01:50 2014 +0000

----------------------------------------------------------------------
 .../java/org/apache/maven/plugin/descriptor/PluginDescriptor.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/6c6b34b0/maven-plugin-api/src/main/java/org/apache/maven/plugin/descriptor/PluginDescriptor.java
----------------------------------------------------------------------
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 02b19c8..460c401 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()