Changed acquireUsingLocked and getUsingLocked behaviour -- now throwing IllegalState if the given value is not reused

This commit is contained in:
leventov
2014-11-10 18:14:30 +03:00
parent 9be0d58baf
commit daac52ba35
3 changed files with 29 additions and 31 deletions
@@ -1362,7 +1362,6 @@ public class ChronicleMapTest {
// check that the entry was removed
try (ReadContext<?, LongValue> context = map.getUsingLocked("one", value)) {
assert value == context.value();
assertEquals(false, context.present());
assertEquals(null, context.value());
}
@@ -1389,7 +1388,7 @@ public class ChronicleMapTest {
}
@Test(expected = IllegalAccessException.class)
@Test(expected = IllegalStateException.class)
public void testAcquireUsingLockedWithString() throws IOException {
ChronicleMapBuilder<CharSequence, String> builder = ChronicleMapBuilder