Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Won't Fix
-
1.1-rc-3
-
None
-
None
Description
This code:
class Foo { static testStatic(version) { staticTrimTag(version) } private static staticTrimTag(pluginVersion) { def i = pluginVersion.indexOf('-') if(i>-1) pluginVersion = pluginVersion[0,i-1] pluginVersion } } version = "1.0-SNAPSHOT" pluginVersion = version i = version.indexOf('-') println "1.0-SNAPSHOT"[0..i-1] println Foo.testStatic("1.0-SNAPSHOT")
Prints
1.0 10
Why?