RFR: 8299513: Cleanup java.io
Sergey Tsypanov
stsypanov at openjdk.org
Wed Jan 4 15:56:52 UTC 2023
On Wed, 4 Jan 2023 15:37:23 GMT, Per Minborg <pminborg at openjdk.org> wrote:
> Code in java.io contains many legacy constructs and semantics not recommended including:
>
> * C-style array declaration
> * Unnecessary visibility
> * Redundant keywords in interfaces (e.g. public, static)
> * Non-standard naming for constants
> * Javadoc typos
> * Missing final declaration
>
> These should be fixed as a sanity effort.
src/java.base/share/classes/java/io/StringWriter.java line 244:
> 242:
> 243: private static int checkSize(int initialSize) {
> 244: if (initialSize < 0) {
Similar checks exist e.g. in `ByteArrayOutputStream` and `CharWrite`, so could we reuse it somehow across java.io?
-------------
PR: https://git.openjdk.org/jdk/pull/11848
More information about the core-libs-dev
mailing list