check
This commit is contained in:
parent
72f7c564a1
commit
92b3ac93d0
@ -55,6 +55,9 @@ public class Settings {
|
|||||||
private final Class<T> klass;
|
private final Class<T> klass;
|
||||||
|
|
||||||
private Setting(T value) {
|
private Setting(T value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new IllegalArgumentException("Cannot determine value type class from null");
|
||||||
|
}
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.klass = (Class<T>) value.getClass();
|
this.klass = (Class<T>) value.getClass();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user