Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.0-JSR-5
-
None
-
None
Description
The following code throws a java.lang.IllegalMonitorStateException.
class SomeClass {
def lock = new Object()
def doSomething() {
synchronized (lock) {
if (1==1)
}
println("doSomething")
}
}
new SomeClass().doSomething()
bryan@rook /c/bryan
$ groovy test.groovy
Caught: java.lang.IllegalMonitorStateException
at SomeClass.doSomething(test.groovy:8)
at test.run(test.groovy:15)
at test.main(test.groovy)
bryan@rook /c/bryan
$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
bryan@rook /c/bryan
$ groovy -version
Groovy Version: 1.0-jsr-05 JVM: 1.5.0_06-b05