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)