mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
Fixes IDEA-286477 Primitive type considered null in generic GitOrigin-RevId: f9e8a5eae5505511d84258b8a1bd67deafe8b8a3
17 lines
333 B
Java
17 lines
333 B
Java
|
|
class Prop<T> {
|
|
private final T defaultValue;
|
|
private final Key key;
|
|
|
|
public Prop(Key key, T defaultValue) {
|
|
assert defaultValue != null;
|
|
this.key = key;
|
|
this.defaultValue = defaultValue;
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
Prop<Integer> prop = new Prop<>(Key.EXAMPLE, 1);
|
|
}
|
|
}
|
|
|
|
enum Key {EXAMPLE} |