-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SystemConsoleNull should consider the case where System.console() == null
#4355
Comments
Thanks, 'no longer returns null' could have been something like 'no longer returns null when the standard streams are redirected or connected to a virtual terminal' Can the implementation return |
At line 431, |
Huh, thanks. I'd misread the code, too. Indeed, I can produce a null return:
I'm hoping that that's at least possible only in the case that the user sets |
https://errorprone.info/bugpattern/SystemConsoleNull says:
However, it may still return
null
, both from the specification and actual implementation.So I propose to:
(a) rephrase the above sentence to
(b) update the code example to handle the case where
System.console() == null
:The text was updated successfully, but these errors were encountered: