krasserm/grails-jaxrs — pull request #24 by ajbrown (2013-08-19 20:57:51+00:00)
Title: Remove copy-pasted MockHttpServletRequest from plugin.

The `MockHttpServletRequest` being included in this plugin uses the same namespace
as the MockHttpServletRequest class it was copied from, but does not implement the same interface. This causes
an `IncompatibleClassChangeError` runtime error to occur if this version of the class is selected within
another class which needs it and expects it to be of the HttpServletRequest
type.

The issue above can be reproduced by installing both the JAX-RS and Mail grails
plugins. The mail plugin uses a MockhttpServletRequest when rendering mail
content, but fails at Runtime because the class is not an HttpServletRequest.

I grepped the code and can't find a reason that this copied class even needs to
exist. It appears that all cases where it's used, the method signature is
compatible with the *real* `MockHttpServletRequest`. Either way, the removed
class needs to be placed in a different namespace (or the dependent code
refactored) in order to prevent chaos.