-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
12.0.1
-
x86
-
os_x
ADDITIONAL SYSTEM INFORMATION :
This also seems to be broken in version 11
A DESCRIPTION OF THE PROBLEM :
https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/io/BufferedReader.html#readLine()
states:
Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), a carriage return followed immediately by a line feed, or by reaching the end-of-file (EOF).
However, a line terminated by EOF (without a line feed or carriage return) is not returned and the text is simply lost when readLine returns null.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Read the lines of a file with the BufferedReader readLines method (alternatively use the lines() stream)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
All lines up until EOF as specified by javadoc should be returned
ACTUAL -
Only lines terminated by line feed or carriage return are returned (as per previous versions' javadoc)
This also seems to be broken in version 11
A DESCRIPTION OF THE PROBLEM :
https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/io/BufferedReader.html#readLine()
states:
Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), a carriage return followed immediately by a line feed, or by reaching the end-of-file (EOF).
However, a line terminated by EOF (without a line feed or carriage return) is not returned and the text is simply lost when readLine returns null.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Read the lines of a file with the BufferedReader readLines method (alternatively use the lines() stream)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
All lines up until EOF as specified by javadoc should be returned
ACTUAL -
Only lines terminated by line feed or carriage return are returned (as per previous versions' javadoc)