RFR: 8261301: StringWriter.flush() is NOOP but documentation does not indicate it

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8261301: StringWriter.flush() is NOOP but documentation does not indicate it

Brian Burkhalter-3
The specification of the method `flush()` in the `java.io` classes `CharArrayWriter` and `StringWriter` is not explicit about the fact that the method has no effect. This request proposes to add to the specification of each flush() method the sentence
The {@code flush} method of {@code <ClassName/>} does nothing.
The corresponding CSR is JDK-8264867.

-------------

Commit messages:
 - 8261301: StringWriter.flush() is NOOP but documentation does not indicate it

Changes: https://git.openjdk.java.net/jdk/pull/3383/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3383&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8261301
  Stats: 6 lines in 2 files changed: 4 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3383.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3383/head:pull/3383

PR: https://git.openjdk.java.net/jdk/pull/3383
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261301: StringWriter.flush() is NOOP but documentation does not indicate it

Naoto Sato-2
On Wed, 7 Apr 2021 21:01:48 GMT, Brian Burkhalter <[hidden email]> wrote:

> The specification of the method `flush()` in the `java.io` classes `CharArrayWriter` and `StringWriter` is not explicit about the fact that the method has no effect. This request proposes to add to the specification of each flush() method the sentence
> The {@code flush} method of {@code <ClassName/>} does nothing.
> The corresponding CSR is JDK-8264867.

Marked as reviewed by naoto (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/3383
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261301: StringWriter.flush() is NOOP but documentation does not indicate it

Roger Riggs-2
In reply to this post by Brian Burkhalter-3
On Wed, 7 Apr 2021 21:01:48 GMT, Brian Burkhalter <[hidden email]> wrote:

> The specification of the method `flush()` in the `java.io` classes `CharArrayWriter` and `StringWriter` is not explicit about the fact that the method has no effect. This request proposes to add to the specification of each flush() method the sentence
> The {@code flush} method of {@code <ClassName/>} does nothing.
> The corresponding CSR is JDK-8264867.

In the CSR, the first sentence of the Summary should be context free.
It is used standalone in other contexts to describe the change.  Perhaps change to:
"Clarify the `flush` methods in java.io classes CharArrayWriter and StringWriter do nothing."

-------------

Marked as reviewed by rriggs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/3383
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261301: StringWriter.flush() is NOOP but documentation does not indicate it

Brian Burkhalter-3
On Thu, 8 Apr 2021 13:46:00 GMT, Roger Riggs <[hidden email]> wrote:

>> The specification of the method `flush()` in the `java.io` classes `CharArrayWriter` and `StringWriter` is not explicit about the fact that the method has no effect. This request proposes to add to the specification of each flush() method the sentence
>> The {@code flush} method of {@code <ClassName/>} does nothing.
>> The corresponding CSR is JDK-8264867.
>
> In the CSR, the first sentence of the Summary should be context free.
> It is used standalone in other contexts to describe the change.  Perhaps change to:
> "Clarify the `flush` methods in java.io classes CharArrayWriter and StringWriter do nothing."

@RogerRiggs I updated the CSR as you suggested, thanks!

-------------

PR: https://git.openjdk.java.net/jdk/pull/3383