Details
-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b65
-
generic
-
windows_xp
Description
Console methods format, printf, readPassword, readLine have a parameter fmt:
-----------------------
* @param fmt
* A format string as described in <a
* href="../util/Formatter.html#syntax">Format string syntax</a>.
-----------------------
1) in readPassword(String, Object...) method description there is written:
---
* @param fmt
* A format string as described in <a href="#syntax">Format string
* syntax</a> for the prompt text.
---
*href* is wrong. Link doesn't work.
2) methods printf(String fmt, Object... args) and format(String fmt, Object... args) throw NullPointerException if fmt = null, but methods readPassword(String fmt, Object... args) and readLine(String fmt, Object... args) don't throw it. Description of the "fmt" is the same across the methods and according to the Console class description, we have:
-----------------------
Unless otherwise specified, passing a null argument to any method in this class will cause a NullPointerException to be thrown.
-----------------------
Such behaviour seems to be strange.
-----------------------
* @param fmt
* A format string as described in <a
* href="../util/Formatter.html#syntax">Format string syntax</a>.
-----------------------
1) in readPassword(String, Object...) method description there is written:
---
* @param fmt
* A format string as described in <a href="#syntax">Format string
* syntax</a> for the prompt text.
---
*href* is wrong. Link doesn't work.
2) methods printf(String fmt, Object... args) and format(String fmt, Object... args) throw NullPointerException if fmt = null, but methods readPassword(String fmt, Object... args) and readLine(String fmt, Object... args) don't throw it. Description of the "fmt" is the same across the methods and according to the Console class description, we have:
-----------------------
Unless otherwise specified, passing a null argument to any method in this class will cause a NullPointerException to be thrown.
-----------------------
Such behaviour seems to be strange.