Closed agentgt closed 3 years ago
I suppose one could argue don't use system.out but we do for unit tests where slf4j isn't worth importing.
I agree that this is very unfortunatey (as is @Nullable on Optional.orElse
) but I don't think we should add technically incorrect annotations. because it is more convenient.
In unit tests you can probably work around that with a single
private static final PrintStream SYSTEM_OUT = Objects.requireNonNull(System.out);
Yeah I totally agree. I for some reason thought it was very rare but looking at the code its entirely possible and its better to be exact for contracts.
System.out being nullable is painful.
It is indeed nullable but in practice it is rarely.