It’s ok to pass null to a Java method when there is no Nullable annotation on generic type parameter, but if it’s a constructor, IDE show me error, but it compiles!
If the IDE is complaining but not the compiler, it could be the new type inference kicking in (blog post) . You can disable it in your IDEA compiler settings.