Re: RFR: 8299513: Cleanup java.io [v6]

2023-01-10 Thread Per Minborg
> 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 declar

Re: RFR: 8299513: Cleanup java.io [v5]

2023-01-10 Thread Per Minborg
On Tue, 10 Jan 2023 14:59:35 GMT, Roger Riggs wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert removal of a final keyword > > src/java.base/share/classes/java/io/ObjectStreamConstants.java line 38: > >> 36:

Re: RFR: 8299513: Cleanup java.io [v5]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 13:34:49 GMT, Per Minborg 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 nam

Re: RFR: 8299513: Cleanup java.io [v5]

2023-01-10 Thread Per Minborg
> 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 declar

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Alan Bateman
On Tue, 10 Jan 2023 00:26:13 GMT, Sergey Bylokhov wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add additional (c) years > > src/java.base/share/classes/java/io/DataInputStream.java line 582: > >> 580: * @se

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Sergey Bylokhov
On Mon, 9 Jan 2023 08:57:11 GMT, Per Minborg 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 nami

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Lance Andersen
On Mon, 9 Jan 2023 08:57:11 GMT, Per Minborg 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 nami

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Alan Bateman
On Mon, 9 Jan 2023 08:57:11 GMT, Per Minborg 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 nami

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Per Minborg
> 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 declar

Re: RFR: 8299513: Cleanup java.io [v3]

2023-01-09 Thread Per Minborg
> 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 declar

Re: RFR: 8299513: Cleanup java.io [v2]

2023-01-06 Thread Alan Bateman
On Thu, 5 Jan 2023 12:34:12 GMT, Per Minborg 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 nami

Re: RFR: 8299513: Cleanup java.io [v2]

2023-01-06 Thread Alan Bateman
On Thu, 5 Jan 2023 17:33:05 GMT, Brian Burkhalter wrote: >> I have added a new proposal in the hope that the `requireNonNegative` method >> name and parameters should be trivial enough for users to directly >> understand without scrolling down. Let me know your thought on this. > > That is defi

Re: RFR: 8299513: Cleanup java.io [v2]

2023-01-05 Thread Brian Burkhalter
On Thu, 5 Jan 2023 12:29:20 GMT, Per Minborg wrote: >> I think the casts are worth it to set `lock` only once during construction, >> but would be inclined to leave out the addition of `checkSize`. > > I have added a new proposal in the hope that the `requireNonNegative` method > name and param

Re: RFR: 8299513: Cleanup java.io [v2]

2023-01-05 Thread Per Minborg
On Thu, 5 Jan 2023 01:42:15 GMT, Brian Burkhalter wrote: >> I assume this is done so that "lock" is only set once during construction >> (StringWriter is a bit unusual in that it uses the SB as the lock object). A >> downside of the change is that it introduces casts. Another is that the >> ex

Re: RFR: 8299513: Cleanup java.io [v2]

2023-01-05 Thread Per Minborg
> 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 declar

Re: RFR: 8299513: Cleanup java.io

2023-01-04 Thread Brian Burkhalter
On Wed, 4 Jan 2023 16:35:57 GMT, Alan Bateman wrote: >> 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` an

Re: RFR: 8299513: Cleanup java.io

2023-01-04 Thread Alan Bateman
On Wed, 4 Jan 2023 15:54:29 GMT, Sergey Tsypanov 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

Re: RFR: 8299513: Cleanup java.io

2023-01-04 Thread Sergey Tsypanov
On Wed, 4 Jan 2023 15:37:23 GMT, Per Minborg 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

RFR: 8299513: Cleanup java.io

2023-01-04 Thread Per Minborg
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 shou