You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2020/02/12 02:38:00 UTC

[jira] [Created] (GROOVY-9394) Groovy could provide some minimal methods to assist with migrating between Groovy versions

Paul King created GROOVY-9394:
---------------------------------

             Summary: Groovy could provide some minimal methods to assist with migrating between Groovy versions
                 Key: GROOVY-9394
                 URL: https://issues.apache.org/jira/browse/GROOVY-9394
             Project: Groovy
          Issue Type: Improvement
            Reporter: Paul King


The goal would be to allow code like:
{code:java}
def slurper = GroovySystem.shortVersion.isAtLeast('3.0') ? new groovy.xml.Slurper() : new groovy.util.XmlSlurper()
{code}
Out of scope:
 * this is not a full blown version api/utility
 * this isn't catering to allow migration scenarios, e.g. the above example is over-simplified for illustrative purposes; it is only useful as is in dynamic contexts and really needs to use reflection even for that case
 * these methods aren't available in all Groovy versions, so while not fully solving the problem, act is reference implementations in the meantime (we may backport these to some earlier branches but that still doesn't solve the problem for existing releases)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)