ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject InputHandler and end-of-stream
Date Wed, 11 Apr 2018 07:46:19 GMT

while reviewing some changes I realized DefaultInputHandler and
SecureInputHandler may create unexpected outcomes if or
System.console() signal an end-of-stream and thus readLine/readPassword
return null.

The former will create an InputRequest with a null getInput() result
which may come unexpected, the later handler will cause an NPE. So far
this NPE would be swallowed (and still will be in 1.9.x) where
DefaultInputHandler is invoked as fallback, after my latest changes to
master it would bubble up, hence my question.

Should we add explicit null guards? I'm not really sure if/when such an
end-of-stream may occur. If so, what would be the outcome? Handle a null
input like an empty input and maybe fall back to the default value?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message