Added eager nullability and type checks of values and functions passed to ChronicleMap, if is probable that they won't be passed (and checked) inside contexts, if, say the key is absent in the map

This commit is contained in:
leventov
2015-01-19 07:06:21 +07:00
parent d897891bfb
commit 4af4fce33c
4 changed files with 21 additions and 0 deletions
@@ -370,6 +370,7 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
}
}
@Override
final void checkValue(Object value) {
if (vClass != Void.class && !vClass.isInstance(value)) {
throw new ClassCastException("Value must be a " + vClass.getName() +