[weld-issues] [JBoss JIRA] Updated: (WELD-840) Weld 1.1 breaks compatibility with groovy objects

Jeff Howard (JIRA) jira-events at lists.jboss.org
Mon Jan 31 16:36:39 EST 2011


     [ https://issues.jboss.org/browse/WELD-840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Howard updated WELD-840:
-----------------------------

    Attachment: full_groovy_support.diff


This patch seems to restore full functionality  when using weld 1.1 with Groovy 1.7.6.

There are 3 issues directly addressed in this patch.
1) weld 1.1 proxies use hyphens in auto-generated proxy class names, which breaks groovy.
2) Methods from groovy.lang.GroovyObject must be filtered out when creating the proxies from groovy objects.
3) There is either a subtle problem with the proxy classes generated by InterceptedSubclassFactory or Groovy's inheritance handling is bollixed.  Not sure which.  Proxies generated by this factory (named *WeldSubclass) are being assigned the metaclass from the corresponding *WeldClientProxy.  Examining the actual metaclass for *WeldSubclass shows that it thinks *WeldSubclass is derived from *WeldClientProxy instead of the actual bean type.  Hrmmm...

> Weld 1.1 breaks compatibility with groovy objects
> -------------------------------------------------
>
>                 Key: WELD-840
>                 URL: https://issues.jboss.org/browse/WELD-840
>             Project: Weld
>          Issue Type: Bug
>          Components: Proxies
>    Affects Versions: 1.1.0.Final
>         Environment: Groovy 1.7.6, tomcat 6, weld 1.1, JSF 2 (mojarra 2.0.3)
>            Reporter: Jeff Howard
>            Assignee: Stuart Douglas
>              Labels: groovy
>         Attachments: full_groovy_support.diff, weld11_partial_groovy_support.diff
>
>
> Weld created proxies need to know how to work with groovy objects.  Currently, weld is attempting to proxy the methods from the groovy.lang.GroovyObject interface which is confusing the groovy runtime.  Groovy objects have a per-class metaclass that is getting used with the wrong class instances.
> Also, weld is using hyphen characters in the generated proxy class names, which breaks groovy's dynamic invoke mechanism.
> The referenced forum thread contains a patch that addresses the groovy incompatabilities in weld's ProxyFactory.java

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list