mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
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:
@@ -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() +
|
||||
|
||||
Reference in New Issue
Block a user