You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example fails with unexpected statement: monitorenter
public class monitorenter1
{
public boolean doIt(boolean b)
{
boolean a;
synchronized(this) {
a = !b;
}
return a;
}
public void test()
{
assert(doIt(false));
}
}
the critical section is enclosed between monitorenter and monitorexit in the bytecode.