On Wed, 4 Jan 2023 15:37:23 GMT, Per Minborg <pminb...@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

Reply via email to