Optimized generalized data value generation ser/deser, when Byteable (i. e. direct impl) is given

This commit is contained in:
leventov
2014-12-27 17:50:21 +07:00
parent b6ec1598e8
commit cf5ae63e84
7 changed files with 319 additions and 137 deletions
@@ -1483,7 +1483,7 @@ public class ChronicleMapTest {
}
@Test(expected = IllegalStateException.class)
@Test
public void testPutLongValue() throws IOException {
final ChronicleMapBuilder<CharSequence, LongValue> builder = ChronicleMapBuilder
.of(CharSequence.class, LongValue.class)
@@ -1493,7 +1493,14 @@ public class ChronicleMapTest {
final ChronicleMap<CharSequence, LongValue> map = builder.create();
LongValue value = nativeLongValue();
map.put("x", value);
try {
map.put("x", value);
} catch (IllegalStateException | NullPointerException e) {
// ok
return;
}
throw new AssertionError("Should throw either IllegalStateException or " +
"NullPointerException, but succeed");
}
@Test