Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The goal would be to allow code like:
def slurper = GroovySystem.shortVersion.isAtLeast('3.0') ? new groovy.xml.Slurper() : new groovy.util.XmlSlurper()
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 as reference implementations in the meantime (we may backport these to some earlier branches but that still doesn't solve the problem for existing releases)
Attachments
Issue Links
- links to