Re: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2]

2020-11-13 Thread Alan Bateman
On Thu, 12 Nov 2020 20:48:13 GMT, Andy Herrick  wrote:

>> JDK-8189198: Add "forRemoval = true" to Applet APIs
>
> Andy Herrick has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains six additional 
> commits since the last revision:
> 
>  - JDK-8189198: Add "forRemoval = true" to Applet APIs
>  - Merge branch 'master' into JDK-8189198
>  - Merge branch 'master' into JDK-8189198
>  - JDK-8189198: Add "forRemoval = true" to Applet APIs
>  - JDK-8189198: Add "forRemoval = true" to Applet APIs
>  - JDK-8189198: Add "forRemoval = true" to Applet APIs

src/java.naming/share/classes/javax/naming/Context.java line 1087:

> 1085: @Deprecated(since="16", forRemoval=true)
> 1086: String APPLET = "java.naming.applet";
> 1087: };

Probably should be since="9" (the deprecation in JDK-8051422 pre-dates the 
enhanced deprecation work).

-

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


Re: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v3]

2020-11-13 Thread Andy Herrick
> JDK-8189198: Add "forRemoval = true" to Applet APIs

Andy Herrick has updated the pull request incrementally with one additional 
commit since the last revision:

  JDK-8189198: Add "forRemoval = true" to Applet APIs

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1127/files
  - new: https://git.openjdk.java.net/jdk/pull/1127/files/d9850cd8..c6ea7714

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1127&range=01-02

  Stats: 6 lines in 2 files changed: 4 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1127.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1127/head:pull/1127

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


Re: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2]

2020-11-13 Thread Kevin Rushforth
On Fri, 13 Nov 2020 09:31:53 GMT, Alan Bateman  wrote:

>> Andy Herrick has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains six additional 
>> commits since the last revision:
>> 
>>  - JDK-8189198: Add "forRemoval = true" to Applet APIs
>>  - Merge branch 'master' into JDK-8189198
>>  - Merge branch 'master' into JDK-8189198
>>  - JDK-8189198: Add "forRemoval = true" to Applet APIs
>>  - JDK-8189198: Add "forRemoval = true" to Applet APIs
>>  - JDK-8189198: Add "forRemoval = true" to Applet APIs
>
> src/java.naming/share/classes/javax/naming/Context.java line 1087:
> 
>> 1085: @Deprecated(since="16", forRemoval=true)
>> 1086: String APPLET = "java.naming.applet";
>> 1087: };
> 
> Probably should be since="9" (the deprecation in JDK-8051422 pre-dates the 
> enhanced deprecation work).

Good point, since it was in fact deprecated in 9.

-

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


Re: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v2]

2020-11-13 Thread Andy Herrick
On Fri, 13 Nov 2020 18:01:18 GMT, Kevin Rushforth  wrote:

>> src/java.naming/share/classes/javax/naming/Context.java line 1087:
>> 
>>> 1085: @Deprecated(since="16", forRemoval=true)
>>> 1086: String APPLET = "java.naming.applet";
>>> 1087: };
>> 
>> Probably should be since="9" (the deprecation in JDK-8051422 pre-dates the 
>> enhanced deprecation work).
>
> Good point, since it was in fact deprecated in 9.

yes - changed to since="9" this morning

-

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


Re: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v3]

2020-11-13 Thread Kevin Rushforth
On Fri, 13 Nov 2020 15:05:15 GMT, Andy Herrick  wrote:

>> JDK-8189198: Add "forRemoval = true" to Applet APIs
>
> Andy Herrick has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   JDK-8189198: Add "forRemoval = true" to Applet APIs

src/java.desktop/share/classes/java/applet/package-info.java line 40:

> 38:  * 
> 39:  * Deprecated.
> 40:  * This package has been deprecated and may be removed in a future 
> version of the Java Platform.

That should be `@deprecated This package ...`. See 
[java/rmi/activation/package-info.java#L41](https://github.com/openjdk/jdk/blob/master/src/java.rmi/share/classes/java/rmi/activation/package-info.java#L41).

-

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


Re: RFR: 8253459: Formatter treats index, width and precision > Integer.MAX_VALUE incorrectly [v6]

2020-11-13 Thread Ian Graves
> The `java.util.Formatter` format specifies support for field widths, argument 
> indexes, or precision lengths of a field that relate to the variadic 
> arguments supplied to the formatter. These numbers are specified by integers, 
> sometimes negative. For argument index, it's specified in the documentation 
> that the highest allowed argument is limited by the largest possible index of 
> an array (ie the largest possible variadic index), but for the other two it's 
> not defined. Moreover, what happens when a number field in a string is too 
> large or too small to be represented by a 32-bit integer type is not defined.
> 
> This fix adds documentation to specify what error behavior occurs during 
> these cases. Additionally it adds an additional exception type to throw when 
> an invalid argument index is observed.
> 
> A CSR will be required for this PR.

Ian Graves has updated the pull request with a new target base due to a merge 
or a rebase. The incremental webrev excludes the unrelated changes brought in 
by the merge/rebase. The pull request contains 14 additional commits since the 
last revision:

 - Merge branch 'format-string-numeric-bound' of github.com:igraves/jdk into 
format-string-numeric-bound
 - Additional specificity around width
 - Tweaking verbiage
 - Updating docs specifying exception for 0 indices
 - Throwing exceptions for zeroth indexes
 - Updating docs
 - Updating docs and throwing errors accordingly
 - Making IllegalFormatArgumentIndexException package private
 - Additional specificity around width
 - Tweaking verbiage
 - ... and 4 more: https://git.openjdk.java.net/jdk/compare/96b6dcaf...a84d3f2f

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/516/files
  - new: https://git.openjdk.java.net/jdk/pull/516/files/0526ef43..a84d3f2f

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=516&range=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=516&range=04-05

  Stats: 302178 lines in 580 files changed: 296317 ins; 3588 del; 2273 mod
  Patch: https://git.openjdk.java.net/jdk/pull/516.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/516/head:pull/516

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


Re: RFR: 8253459: Formatter treats index, width and precision > Integer.MAX_VALUE incorrectly [v7]

2020-11-13 Thread Ian Graves
> The `java.util.Formatter` format specifies support for field widths, argument 
> indexes, or precision lengths of a field that relate to the variadic 
> arguments supplied to the formatter. These numbers are specified by integers, 
> sometimes negative. For argument index, it's specified in the documentation 
> that the highest allowed argument is limited by the largest possible index of 
> an array (ie the largest possible variadic index), but for the other two it's 
> not defined. Moreover, what happens when a number field in a string is too 
> large or too small to be represented by a 32-bit integer type is not defined.
> 
> This fix adds documentation to specify what error behavior occurs during 
> these cases. Additionally it adds an additional exception type to throw when 
> an invalid argument index is observed.
> 
> A CSR will be required for this PR.

Ian Graves has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now contains seven commits:

 - Making IllegalFormatArgumentIndexException package private
 - Additional specificity around width
 - Tweaking verbiage
 - Updating docs specifying exception for 0 indices
 - Throwing exceptions for zeroth indexes
 - Updating docs
 - Updating docs and throwing errors accordingly

-

Changes: https://git.openjdk.java.net/jdk/pull/516/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=516&range=06
  Stats: 94 lines in 4 files changed: 86 ins; 0 del; 8 mod
  Patch: https://git.openjdk.java.net/jdk/pull/516.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/516/head:pull/516

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


Re: RFR: 8253459: Formatter treats index, width and precision > Integer.MAX_VALUE incorrectly [v7]

2020-11-13 Thread Ian Graves
On Tue, 6 Oct 2020 19:10:46 GMT, Ian Graves  wrote:

>> Is the new exception type useful?  yes, it matches the previous pattern.
>> But it does not (and none of the IllegalFormatException subclasses) produce 
>> a readable message with the offending value. So the developer will not see 
>> anything useful.
>> The fine grained exceptions provide little value.
>
> I've been on the fence about this, personally. The Formatter uses pretty 
> fine-grained exception types for error conditions. I'd be okay discontinuing 
> this practice here, but am not sure what to replace this with. Perhaps we 
> enable `IllegalFormatException` to be, itself, public and instantiable ?

Updates (including cleaning up some git weirdness with rebasing) include 
adherence to the new CSR draft proposal. This makes the new exception type 
package-private.

-

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


Re: RFR: JDK-8189198: Add "forRemoval = true" to Applet APIs [v3]

2020-11-13 Thread Sergey Bylokhov
On Fri, 13 Nov 2020 18:20:37 GMT, Kevin Rushforth  wrote:

>> Andy Herrick has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   JDK-8189198: Add "forRemoval = true" to Applet APIs
>
> src/java.desktop/share/classes/java/applet/package-info.java line 40:
> 
>> 38:  * 
>> 39:  * Deprecated.
>> 40:  * This package has been deprecated and may be removed in a future 
>> version of the Java Platform.
> 
> That should be `@deprecated This package ...`. See 
> [java/rmi/activation/package-info.java#L41](https://github.com/openjdk/jdk/blob/master/src/java.rmi/share/classes/java/rmi/activation/package-info.java#L41).

The deprecation description should point to the new API which might be used 
instead of the deprecated ones. So the text "deprecated without replacement" 
was intentionally added, it will be good to preserve it.

-

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


Re: RFR: 8253459: Formatter treats index, width and precision > Integer.MAX_VALUE incorrectly [v8]

2020-11-13 Thread Ian Graves
> The `java.util.Formatter` format specifies support for field widths, argument 
> indexes, or precision lengths of a field that relate to the variadic 
> arguments supplied to the formatter. These numbers are specified by integers, 
> sometimes negative. For argument index, it's specified in the documentation 
> that the highest allowed argument is limited by the largest possible index of 
> an array (ie the largest possible variadic index), but for the other two it's 
> not defined. Moreover, what happens when a number field in a string is too 
> large or too small to be represented by a 32-bit integer type is not defined.
> 
> This fix adds documentation to specify what error behavior occurs during 
> these cases. Additionally it adds an additional exception type to throw when 
> an invalid argument index is observed.
> 
> A CSR will be required for this PR.

Ian Graves has updated the pull request incrementally with one additional 
commit since the last revision:

  Moving additional methods to package private

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/516/files
  - new: https://git.openjdk.java.net/jdk/pull/516/files/4bcb053e..5a0effe1

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=516&range=07
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=516&range=06-07

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/516.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/516/head:pull/516

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