[jira] [Commented] (OFBIZ-10806) Groovy Base script redundancy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-10806) Groovy Base script redundancy

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-10806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16741874#comment-16741874 ]

Mathieu Lirzin commented on OFBIZ-10806:
----------------------------------------

I have included  [^OFBIZ-10806.patch] which removes the {{GroovyInit.groovy}} script and its usage which like described above is redundant.

> Groovy Base script redundancy
> -----------------------------
>
>                 Key: OFBIZ-10806
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10806
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Mathieu Lirzin
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-10806.patch
>
>
> According to [Groovy documentation|http://docs.groovy-lang.org/latest/html/documentation/#_script_base_classes] the following construction:
> {code:java}
> CompilerConfiguration conf = new CompilerConfiguration();
> conf.setScriptBaseClass(scriptBaseClass);
> groovyClassLoader = new GroovyClassLoader(GroovyUtil.class.getClassLoader(), conf);
> {code}
> is equivalent to running the a script containing the {{@BaseScript}} annotation.
> In {{org.apache.ofbiz.base.util.GroovyUtil}} instead of choosing one solution, we are doing both. :-)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)