-
Bug
-
Resolution: Unresolved
-
P4
-
11, 17, 21, 22
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
java.io.PrintStream.println(...), unlike java.io.PrintWriter.println(...), does not allow to change the line break sequence it uses.
This is due to the fact that, contrary to its specification, it does not call print(...) followed by println() but newLine() which is private and therefore cannot be overridden.
E.g.:
/**
* Prints a String and then terminate the line. This method behaves as
* though it invokes {@link #print(String)} and then
* {@link #println()}.
*
* @param x The {@code String} to be printed.
*/
This issue might be related to https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8215412
FREQUENCY : always
java.io.PrintStream.println(...), unlike java.io.PrintWriter.println(...), does not allow to change the line break sequence it uses.
This is due to the fact that, contrary to its specification, it does not call print(...) followed by println() but newLine() which is private and therefore cannot be overridden.
E.g.:
/**
* Prints a String and then terminate the line. This method behaves as
* though it invokes {@link #print(String)} and then
* {@link #println()}.
*
* @param x The {@code String} to be printed.
*/
This issue might be related to https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8215412
FREQUENCY : always
- duplicates
-
JDK-8317425 PrintStream does not allow the line separator to be overridden
-
- Closed
-