# HG changeset patch # User bpb # Date 1491262849 25200 # Node ID a7aa001a91e692dfa5b76a02758e80ab5a95fa35 # Parent 82ca8259333d04ad564c4eb5f487cfcaa376a359 8177526: BufferedReader readLine() javadoc does not match the implementation regarding EOF Summary: Improve the verbiage of the method and return value descriptions Reviewed-by: lancea, smarks diff -r 82ca8259333d -r a7aa001a91e6 jdk/src/java.base/share/classes/java/io/BufferedReader.java --- a/jdk/src/java.base/share/classes/java/io/BufferedReader.java Mon Apr 03 12:54:43 2017 +0100 +++ b/jdk/src/java.base/share/classes/java/io/BufferedReader.java Mon Apr 03 16:40:49 2017 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -297,14 +297,15 @@ /** * Reads a line of text. A line is considered to be terminated by any one - * of a line feed ('\n'), a carriage return ('\r'), or a carriage return - * followed immediately by a linefeed. + * 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). * * @param ignoreLF If true, the next '\n' will be skipped * * @return A String containing the contents of the line, not including * any line-termination characters, or null if the end of the - * stream has been reached + * stream has been reached without reading any characters * * @see java.io.LineNumberReader#readLine() * @@ -375,12 +376,13 @@ /** * Reads a line of text. A line is considered to be terminated by any one - * of a line feed ('\n'), a carriage return ('\r'), or a carriage return - * followed immediately by a linefeed. + * 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). * * @return A String containing the contents of the line, not including * any line-termination characters, or null if the end of the - * stream has been reached + * stream has been reached without reading any characters * * @exception IOException If an I/O error occurs *