jenkinsci/email-ext-plugin — pull request #62 by jglick (2013-03-28 22:38:11+00:00)
Title: isMatrixProject should not assume that its parameter is an AbstractProject.

Otherwise when trying to include `ExtendedEmailPublisher` configuration in a special UI, such as in a template attribute using the CloudBees Templates plugin, you get a nasty exception like

```
groovy.lang.MissingMethodException: No signature of method: hudson.plugins.emailext.ExtendedEmailPublisherDescriptor.isMatrixProject() is applicable for argument types: (com.cloudbees.hudson.plugins.modeling.controls.DescriptorListControl) values: [com.cloudbees.hudson.plugins.modeling.controls.DescriptorListControl@4a54fa67]
Possible solutions: isMatrixProject(hudson.model.AbstractProject)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at hudson.plugins.emailext.ExtendedEmailPublisherDescriptor$isMatrixProject.call(Unknown Source)
at config.run(config.groovy:109)
```

Since in this context the configuration snippet cannot determine if it is supposed to be applied to a `MatrixProject` or not (in general configuration cannot inspect its environment reliably), it is best to assume it is not and just skip that block.