242243244245246247248249250251252
assertFalse(ran[0]); assertFalse(ran[1]); assertTrue(ran[2]); try { handler.unlock(object); fail("only a behaviour with the same key as the locking behaviour should be able" + //$NON-NLS-1$ "to unlock the handler"); //$NON-NLS-1$ } catch (Exception e) { // good }
256257258259260261262263264265266
fail("not implemented as a reentrant lock."); //$NON-NLS-1$ } catch (Exception e) { // good } handler.unlock(locker); locked[0]=false; assertFalse(handler.isLocked()); ran[0] = false;