mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Forbid primitive types as key/value types for Chronicle Map early
This commit is contained in:
@@ -54,6 +54,11 @@ public final class SerializationBuilder<T> implements Cloneable {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void configureByDefault(Class<T> tClass) {
|
||||
if (tClass.isPrimitive()) {
|
||||
throw new IllegalArgumentException(
|
||||
"Chronicle Map's key or value type cannot be primitive, " + tClass +
|
||||
" type is given");
|
||||
}
|
||||
|
||||
if (tClass.isInterface() && Values.isValueInterfaceOrImplClass(tClass)) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user