Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.4
-
None
Description
If you run this piece of code:
println GroovySystem.version println( ('a' as char) ^ ('b' as char) )
On OS X running with the Apple JVM, then you get:
1.8.4 3
If you're running on the Java 6 OpenJDK (for example with Ubuntu, or the Groovy Web Console), you get:
1.8.4 groovy.lang.MissingMethodException: No signature of method: java.lang.Character.xor() is applicable for argument types: (java.lang.Character) values: [b] Possible solutions: div(java.lang.Character), any(), use([Ljava.lang.Object;), plus(java.lang.Character), is(java.lang.Object), any(groovy.lang.Closure) at Script1.run(Script1.groovy:2)
Is there anything that can be done to get the behaviour the same across the board?
Jochen said on the mailing list that it was an issue to do with the native type optimisations.
Maybe just adding xor to Character would get rid of the OpenJDK issue?