Integrated: JDK-8253936 Replace ... with {@code ...} for java.sql

2020-11-25 Thread Vipin Sharma
On Fri, 16 Oct 2020 19:38:45 GMT, Vipin Sharma  wrote:

> ... is replaced with {@code ...} in java.sql classes.
> Please review and sponsor this change.

This pull request has now been integrated.

Changeset: dee79d60
Author:    Vipin Sharma 
Committer: Lance Andersen 
URL:   https://git.openjdk.java.net/jdk/commit/dee79d60
Stats: 4698 lines in 58 files changed: 0 ins; 0 del; 4698 mod

8253936: Replace ... with {@code ...} for java.sql

Reviewed-by: lancea

-

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


Re: RFR: JDK-8253936 Replace ... with {@code ...} for java.sql [v2]

2020-11-25 Thread Vipin Sharma
On Wed, 4 Nov 2020 19:29:34 GMT, Lance Andersen  wrote:

>> Vipin Sharma has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Updated copyright year and other issues reporrted in review
>
> Marked as reviewed by lancea (Reviewer).

I think all steps are completed for this PR, please help sponsoring this.

-

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


Re: RFR: JDK-8253936 Replace ... with {@code ...} for java.sql [v2]

2020-11-03 Thread Vipin Sharma
> ... is replaced with {@code ...} in java.sql classes.
> Please review and sponsor this change.

Vipin Sharma has updated the pull request incrementally with one additional 
commit since the last revision:

  Updated copyright year and other issues reporrted in review

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/707/files
  - new: https://git.openjdk.java.net/jdk/pull/707/files/89245f36..0823d56f

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

  Stats: 31 lines in 29 files changed: 0 ins; 0 del; 31 mod
  Patch: https://git.openjdk.java.net/jdk/pull/707.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/707/head:pull/707

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


Re: RFR: JDK-8253936 Replace ... with {@code ...} for java.sql

2020-10-17 Thread Vipin Sharma
On Fri, 16 Oct 2020 19:38:45 GMT, Vipin Sharma  wrote:

> ... is replaced with {@code ...} in java.sql classes.
> Please review and sponsor this change.

Hi @LanceAndersen,

I have generated javadoc before and after change. Following are 3 differences 
showing side by side comparison here.

DriverManager.java - line 417 (Change: CODE replaced with code)
d.getClass().getName() |  
d.getClass().getName()

ResultSet.java - line 3085 (Change: CODE replaced with code)
the result set concurrency is CONCUR_READ_ONLY  |   the result set 
concurrency is
CONCUR_READ_ONLY

SQLClientInfoException.java - line 60 (Change: removed space before null)
  null and the vendor code is initialized to 0.  |  
null and the vendor code is initialized to
 0.
 
All the above three changes doesn't change the effective view.

-

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


RFR: JDK-8253936 Replace ... with {@code ...} for java.sql

2020-10-16 Thread Vipin Sharma
... is replaced with {@code ...} in java.sql classes.
Please review and sponsor this change.

-

Commit messages:
 - JDK-8253936 Replace ... with {@code ...} for java.sql

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

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


Re: RFR: 8252537: Updated @exception with @throws [v4]

2020-09-27 Thread Vipin Sharma
> Updated @exception with @throws for core-libs, it fixes all open sub-tasks of 
> JDK-8252536.
> 
> Open Subtasks part of this fix are:
> 1. JDK-8252537
> 2. JDK-8252539
> 3. JDK-8252540
> 4. JDK-8252541
> 
> Previous conversation on this:
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068540.html

Vipin Sharma has updated the pull request incrementally with one additional 
commit since the last revision:

  Replaced ... with {@code ...} for modified statement in java.sql

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/95/files
  - new: https://git.openjdk.java.net/jdk/pull/95/files/37b69369..b9ed6571

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

  Stats: 432 lines in 7 files changed: 0 ins; 0 del; 432 mod
  Patch: https://git.openjdk.java.net/jdk/pull/95.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/95/head:pull/95

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


Re: RFR: 8252537: Updated @exception with @throws [v3]

2020-09-24 Thread Vipin Sharma
On Thu, 24 Sep 2020 17:30:52 GMT, Lance Andersen  wrote:

> Overall the changes look OK. in the java.sql set of classes, please updated 
> the modified statements to also use {@code}

Hi @LanceAndersen, it was suggested by @RogerRiggs also. I have created a 
separate bug JDK-8253612 to fix this for all
java.sql and all other core-libs classes.  Following is earlier discussion on 
this.
https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068510.html

-

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


Re: RFR: 8252537: Updated @exception with @throws [v3]

2020-09-19 Thread Vipin Sharma
> Updated @exception with @throws for core-libs, it fixes all open sub-tasks of 
> JDK-8252536.
> 
> Open Subtasks part of this fix are:
> 1. JDK-8252537
> 2. JDK-8252539
> 3. JDK-8252540
> 4. JDK-8252541
> 
> Previous conversation on this:
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068540.html

Vipin Sharma has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now
contains one commit:

  JDK-8252537 Updated @exception with @throws, implemented review comments

-

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

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


Re: RFR: 8252537: Updated @exception with @throws [v2]

2020-09-19 Thread Vipin Sharma
On Tue, 15 Sep 2020 19:19:07 GMT, Roger Riggs  wrote:

>> @RogerRiggs I understand your point and will update PR with correct 
>> indentation.
>> But I think adding 3 spaces after throws may not be right for all cases.
>> For example when
>> 1. Another tag in same method is using only 1 space.
>> 2. In some cases (e.g. free method of Blob.java) we had a mix of throws and 
>> exception in the same method both with one
>> space after. Here after adding 3 spaces throws tags will have the different 
>> number of spaces and indentation will not
>> be same as before.  I will update PR to make sure the indentation looks same 
>> as before and there is no change in
>> javadoc. Please tell me in case my understnding is not correct here.
>
> HI Vipin,
> 
> Correct, a better description is "fix the indentation".
> I mnetioned 3 because that was the difference in length between
> "exception" and "throws".
> 
> Thanks for the followup, Roger
> 
> 
> 
> On 9/15/20 3:14 PM, Vipin Sharma wrote:
>>
>> @RogerRiggs
>> <https://urldefense.com/v3/__https://github.com/RogerRiggs__;!!GqivPVa7Brio!IQp3U9OccSzrjwI7nzJl491MGc8URG355lsnpdvFTIOGQcgmRGlpC-Kpz3kh64J6$>
>> I understand your point and will update PR with correct indentation.
>> But I think adding 3 spaces after throws may not be right for all cases.
>> For example when
>>
>>  1. Another tag in same method is using only 1 space.
>>  2. In some cases (e.g. free method of Blob.java) we had a mix of
>> throws and exception in the same method both with one space after.
>> Here after adding 3 spaces throws tags will have the different
>> number of spaces and indentation will not be same as before.
>>
>> I will update PR to make sure the indentation looks same as before and
>> there is no change in javadoc.
>> Please tell me in case my understnding is not correct here.
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/95*issuecomment-692922280__;Iw!!GqivPVa7Brio!IQp3U9OccSzrjwI7nzJl491MGc8URG355lsnpdvFTIOGQcgmRGlpC-Kpz78EqgGt$>,
>> or unsubscribe
>> <https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AAIRSVAMITTR62U3YVETCM3SF64IFANCNFSM4RDCQ4MA__;!!GqivPVa7Brio!IQp3U9OccSzrjwI7nzJl491MGc8URG355lsnpdvFTIOGQcgmRGlpC-Kpz1RGWzIm$>.
>>

There was something wrong with the way I updated this PR, please ignore this. I 
will try to correct this or will close
this PR and create a new one.

-

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


Re: RFR: 8252537: Updated @exception with @throws [v2]

2020-09-19 Thread Vipin Sharma
> Updated @exception with @throws for core-libs, it fixes all open sub-tasks of 
> JDK-8252536.
> 
> Open Subtasks part of this fix are:
> 1. JDK-8252537
> 2. JDK-8252539
> 3. JDK-8252540
> 4. JDK-8252541
> 
> Previous conversation on this:
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068540.html

Vipin Sharma 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 three additional commits since
the last revision:

 - JDK-8252537 Updated @exception with @throws
 - JDK-8252537 Updated @exception with @throws
 - JDK-8252537 Updated @exception with @throws

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/95/files
  - new: https://git.openjdk.java.net/jdk/pull/95/files/a84158ac..e9953466

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

  Stats: 20314 lines in 606 files changed: 10333 ins; 7230 del; 2751 mod
  Patch: https://git.openjdk.java.net/jdk/pull/95.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/95/head:pull/95

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


Re: RFR: 8252537: Updated @exception with @throws

2020-09-15 Thread Vipin Sharma
On Tue, 15 Sep 2020 18:14:58 GMT, Serguei Spitsyn  wrote:

>> Updated @exception with @throws for core-libs, it fixes all open sub-tasks 
>> of JDK-8252536.
>> 
>> Open Subtasks part of this fix are:
>> 1. JDK-8252537
>> 2. JDK-8252539
>> 3. JDK-8252540
>> 4. JDK-8252541
>> 
>> Previous conversation on this:
>> https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068540.html
>
> I've only looked at the management files. They look good in general.
> 
> src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java
> 
> 108  * @throws  java.lang.SecurityException if a security manager
> 109  * exists and the caller does not have
> 110  * ManagementPermission("control").
> 
> 
> src/java.management/share/classes/java/lang/management/MemoryMXBean.java
> 
> 286  * @throws  java.lang.SecurityException if a security manager
> 287  * exists and the caller does not have
> 288  * ManagementPermission("control").
> 
> Could you, please, fix the indentation?

@RogerRiggs I understand your point and will update PR with correct indentation.
But I think adding 3 spaces after throws may not be right for all cases.
For example when
1. Another tag in same method is using only 1 space.
2. In some cases (e.g. free method of Blob.java) we had a mix of throws and 
exception in the same method both with one
space after. Here after adding 3 spaces throws tags will have the different 
number of spaces and indentation will not
be same as before.

I will update PR to make sure the indentation looks same as before and there is 
no change in javadoc.
Please tell me in case my understnding is not correct here.

-

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


RFR: 8252537: Updated @exception with @throws

2020-09-09 Thread Vipin Sharma
Updated @exception with @throws for core-libs, it fixes all open sub-tasks of 
JDK-8252536.

Open Subtasks part of this fix are:
1. JDK-8252537
2. JDK-8252539
3. JDK-8252540
4. JDK-8252541

-

Commit messages:
 - JDK-8252537 Updated @exception with @throws

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

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


Re: RFR 8252537: Replace @exception with @throws for core-libs

2020-09-04 Thread Vipin Sharma
Hi,

I have generated Javadoc for all updated packages and compared html files, 
before and after changes.
All looks good, only generation time is different in html files.

Regards,
Vipin

> On Sep 5, 2020, at 12:47 AM, Vipin Sharma  wrote:
> 
> Hi Pavel,
> 
> 
>> On Sep 4, 2020, at 2:27 PM, Pavel Rappo > <mailto:pavel.ra...@oracle.com>> wrote:
>> 
>> Oops, wrong issue number. Here's the correct one: JDK-8157682.
>> 
>>> On 4 Sep 2020, at 09:52, Pavel Rappo >> <mailto:pavel.ra...@oracle.com>> wrote:
>>> 
>>> It would be nice to compare documentation HTML files generated before and 
>>> after that patch: there's a possibility of non-local consequences, see 
>>> JDK-6509045.
> 
> There are ~ 1.5K lines, 86 files changed in this patch, do we have any tool 
> to compare Javadoc or it should be done manually ?
> 
>>> 
>>> -Pavel
>>> 
>>>> On 3 Sep 2020, at 20:33, Vipin Sharma  wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> Please review and sponsor the fix for replacing @exception with @throws for
>>>> core-libs.
>>>> 
>>>> Issue: https://bugs.openjdk.java.net/browse/JDK-8252537
>>>> Webrev: https://cr.openjdk.java.net/~vsharma/8252537
>>>> 
>>>> As suggested in the previous discussion
>>>> <https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068486.html>,
>>>> this webrev has a consolidated fix for all subtasks of the JDK-8252536
>>>> <https://bugs.openjdk.java.net/browse/JDK-8252536>.
>>>> There is no change in the indentation as part of this webrev.
>>>> 
>>>> Regards,
>>>> Vipin
>>> 
>> 
> Regards,
> Vipin



Re: RFR 8252537: Replace @exception with @throws for core-libs

2020-09-04 Thread Vipin Sharma
Hi Pavel,


> On Sep 4, 2020, at 2:27 PM, Pavel Rappo  wrote:
> 
> Oops, wrong issue number. Here's the correct one: JDK-8157682.
> 
>> On 4 Sep 2020, at 09:52, Pavel Rappo  wrote:
>> 
>> It would be nice to compare documentation HTML files generated before and 
>> after that patch: there's a possibility of non-local consequences, see 
>> JDK-6509045.

There are ~ 1.5K lines, 86 files changed in this patch, do we have any tool to 
compare Javadoc or it should be done manually ?

>> 
>> -Pavel
>> 
>>> On 3 Sep 2020, at 20:33, Vipin Sharma  wrote:
>>> 
>>> Hi,
>>> 
>>> Please review and sponsor the fix for replacing @exception with @throws for
>>> core-libs.
>>> 
>>> Issue: https://bugs.openjdk.java.net/browse/JDK-8252537
>>> Webrev: https://cr.openjdk.java.net/~vsharma/8252537
>>> 
>>> As suggested in the previous discussion
>>> <https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068486.html>,
>>> this webrev has a consolidated fix for all subtasks of the JDK-8252536
>>> <https://bugs.openjdk.java.net/browse/JDK-8252536>.
>>> There is no change in the indentation as part of this webrev.
>>> 
>>> Regards,
>>> Vipin
>> 
> 
Regards,
Vipin

Re: RFR 8252537: Replace @exception with @throws for core-libs

2020-09-04 Thread Vipin Sharma
Hi Martin,


> On Sep 4, 2020, at 1:14 AM, Martin Buchholz  wrote:
> 
> Thanks for doing this!
> 
> 15 years ago I considered taking on this task, eventually backing away
> because it was too much work (!).  But I made sure most of the classes
> I maintained were using @throws.
> 
> When considering this, I thought that tidying the whitespace after
> conversion would be a big part of the task, even though it is
> technically non-essential.  Current use of whitespace with @throws is
> inconsistent, as you have seen.
> 

In these inconsistencies majority of the cases, we have more than one 
whitespace after @throws. There are a few cases where we have more than one 
whitespace character before @throws as well.
I think if we are fixing whitespace inconsistencies of @throws then at the same 
time we should fix for other tags as well.

Following are occurrences from jdk/src/ for some of the Javadoc tags along with 
regex used. If you think it is worth fixing I can start it from core-libs.

\*[ ]{1}@throws[ ]{2,}
Occurrences 4191

\*[ ]{1}@param[ ]{2,}
Occurrences 7543

\*[ ]{1}@return[ ]{2,}
Occurrences 3830

\*[ ]{1}@see[ ]{2,}
Occurrences 3886

\*[ ]{1}@since[ ]{2,}
Occurrences 1826

\*[ ]{1}@author[ ]{2,}
Occurrences 1156

\*[ ]{1}@deprecated [ ]{2,}
22 Occurrences

\*[ ]{1}@serial[ ]{2,} 
4 Occurrences

\*[ ]{1}@serialData[ ]{2,}
3 Occurrences

\*[ ]{1}@serialField[ ]{2,}
10 Occurrences

\*[ ]{1}@version[ ]{2,}
1 Occurrence


> On Thu, Sep 3, 2020 at 12:34 PM Vipin Sharma  wrote:
>> 
>> Hi,
>> 
>> Please review and sponsor the fix for replacing @exception with @throws for
>> core-libs.
>> 
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8252537
>> Webrev: https://cr.openjdk.java.net/~vsharma/8252537
>> 
>> As suggested in the previous discussion
>> <https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-September/068486.html>,
>> this webrev has a consolidated fix for all subtasks of the JDK-8252536
>> <https://bugs.openjdk.java.net/browse/JDK-8252536>.
>> There is no change in the indentation as part of this webrev.
>> 
>> Regards,
>> Vipin


Regards,
Vipin



RFR 8252537: Replace @exception with @throws for core-libs

2020-09-03 Thread Vipin Sharma
Hi,

Please review and sponsor the fix for replacing @exception with @throws for
core-libs.

Issue: https://bugs.openjdk.java.net/browse/JDK-8252537
Webrev: https://cr.openjdk.java.net/~vsharma/8252537

As suggested in the previous discussion
,
this webrev has a consolidated fix for all subtasks of the JDK-8252536
.
There is no change in the indentation as part of this webrev.

Regards,
Vipin


Re: RFR 8252538: Replace @exception with @throws java.rmi package

2020-09-03 Thread Vipin Sharma
Hi Roger,

On Thu, Sep 3, 2020 at 2:20 AM Roger Riggs  wrote:

> Hi Vipin,
>
> Looks fine.
>
> I see you filed separate tasks for the other packages in java.rmi. [1]
> That's unnecessarily fine grained.
> It would be more efficient to do them all in one code review, saving your
> time and reviewers time.
>

I agree. In the next patch, I will include all remaining occurrences of
@exception in the core-libs 
area.

Also, I noticed that those files still use the   markup.
> Converting them to use {@code ... } is another useful task.
>

I will take this task.


> Thanks, Roger
>
> [1]https://bugs.openjdk.java.net/browse/JDK-8252536
>

Thanks,
Vipin


Re: RFR 8252538: Replace @exception with @throws java.rmi package

2020-09-02 Thread Vipin Sharma
Hi Roger,

On Tue, Sep 1, 2020 at 10:49 PM Roger Riggs  wrote:

> Hi Vipin,
>
> Looks fine.
>
> Though I would also correct the indentation and join source lines in a
> few cases.
>
> MasrshalledObject.java.  Continuation lines should be indented. Lines
> 110 and 164, 166.
>
Fixed.

>
> Naming.java: Join line 110, 137, 162, 191: "appropriately... formatted URL"
>
Fixed lines 113, 140, and 164 as well, similar problems.

>
> Thanks, Roger
>

Updated webrev: https://cr.openjdk.java.net/~vsharma/8252538/webrev.02/

Regards,
Vipin


RFR 8252538: Replace @exception with @throws java.rmi package

2020-09-01 Thread Vipin Sharma
Hi,

Please review and sponsor the fix for replacing @exception with @throws in
java.rmi package.

Issue: https://bugs.openjdk.java.net/browse/JDK-8252538
Webrev: https://cr.openjdk.java.net/~vsharma/8252538/webrev.01/


Regards,
Vipin


Re: RFR 8252265: Replace @exception with @throws java.util.logging package

2020-08-27 Thread Vipin Sharma
Hi Daniel,

> On Aug 26, 2020, at 10:25 PM, Daniel Fuchs  wrote:
> 
> Hi Vipin,
> 
> This looks good to me.
> Make sure to generate the API docs locally and eyeball them to
> double check that nothing is amiss.

Checked API docs, it doesn’t have any change.

Regards,
Vipin

RFR 8252265: Replace @exception with @throws java.util.logging package

2020-08-26 Thread Vipin Sharma
Hi,

Please review and sponsor the fix for replacing @exception with @throws in
java.util.logging package.

Issue: https://bugs.openjdk.java.net/browse/JDK-8252265
Webrev: https://cr.openjdk.java.net/~vsharma/8252265/

It came up in the below discussion, starting this cleanup with
java.util.logging package.
https://mail.openjdk.java.net/pipermail/core-libs-dev/2020-August/068172.html

Regards,
Vipin


Re: Fix for Javadoc errors in java.base

2020-08-14 Thread Vipin Sharma
Hi Sean,

All 3 instances of @exception in DHPrivateKey are now replaced with @throws, 
added ProviderException similar to other constructor of DHPrivateKey.

Updated patch:

--- old/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java   
2020-08-14 23:55:40.921599987 +0530
+++ new/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java   
2020-08-14 23:55:40.417581423 +0530
@@ -80,7 +80,7 @@
  * @param p the prime modulus
  * @param g the base generator
  *
- * @exception ProviderException if the key cannot be encoded
+ * @throws ProviderException if the key cannot be encoded
  */
 DHPrivateKey(BigInteger x, BigInteger p, BigInteger g)
 throws InvalidKeyException {
@@ -97,7 +97,7 @@
  * @param g the base generator
  * @param l the private-value length
  *
- * @exception InvalidKeyException if the key cannot be encoded
+ * @throws ProviderException if the key cannot be encoded
  */
 DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
 this.x = x;
@@ -118,7 +118,7 @@
  *
  * @param encodedKey the encoded key
  *
- * @exception InvalidKeyException if the encoded key does not represent
+ * @throws InvalidKeyException if the encoded key does not represent
  * a Diffie-Hellman private key
  */
 DHPrivateKey(byte[] encodedKey) throws InvalidKeyException {
--- 
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
   2020-08-14 23:55:41.953638446 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
   2020-08-14 23:55:41.445619497 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of the
  * functional interface
- * @throws ReflectiveOperationException
+ * @throws LambdaConversionException
  */
 abstract CallSite buildCallSite()
 throws LambdaConversionException;
--- 
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
   2020-08-14 23:55:42.977677096 +0530
+++ 
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
   2020-08-14 23:55:42.473658062 +0530
@@ -200,7 +200,6 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of the
  * functional interface
- * @throws ReflectiveOperationException
  * @throws LambdaConversionException If properly formed functional 
interface
  * is not found
  */
--- old/src/java.base/share/classes/java/math/BigDecimal.java   2020-08-14 
23:55:44.409731999 +0530
+++ new/src/java.base/share/classes/java/math/BigDecimal.java   2020-08-14 
23:55:43.889711942 +0530
@@ -5403,7 +5403,7 @@
  *
  * @param n the numerator; must be negative
  * @param d the denominator; must not be unity
- * @return a two-element {@long} array with the remainder and quotient in
+ * @return a two-element {@code long} array with the remainder and 
quotient in
  * the initial and final elements, respectively
  */
 private static long[] divRemNegativeLong(long n, long d) {
--- old/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-08-14 23:55:45.905790246 +0530
+++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-08-14 23:55:45.397770378 +0530
@@ -145,7 +145,6 @@
  * Makes this number an {@code n}-int number all of whose bits are ones.
  * Used by Burnikel-Ziegler division.
  * @param n number of ints in the {@code value} array
- * @return a number equal to {@code ((1<<(32*n)))-1}
  */
 private void ones(int n) {
 if (n > value.length)
--- old/src/java.base/share/classes/java/net/ServerSocket.java  2020-08-14 
23:55:46.961831962 +0530
+++ new/src/java.base/share/classes/java/net/ServerSocket.java  2020-08-14 
23:55:46.449811716 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
 /**
  * Creates the socket implementation.
  *
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
  * @since 1.4
  */
 void createImpl() throws SocketException {
--- old/src/java.base/share/classes/java/net/Socket.java2020-08-14 
23:55:48.001873514 +0530
+++ new/src/java.base/share/classes/java/net/Socket.java

Re: Fix for Javadoc errors in java.base

2020-07-27 Thread Vipin Sharma
Hi Joe,

I ran an IntelliJ inspection to find these errors.

Regards,
Vipin

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Jul 28, 2020 at 5:53 AM Joe Darcy  wrote:

> Hello Vipin,
>
> What tooling was used to find these errors? Running doclint against
> private methods too?
>
> Thanks,
>
> -Joe
>
> On 7/27/2020 12:37 PM, Vipin Sharma wrote:
> > Hi,
> >
> > This patch fixes Javadoc errors in java.base, please sponsor this patch
> and
> > help to create a bug id for this.
> > I have signed OCA, this is my third patch.
> >
> > ---
> > old/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java
> > 2020-07-25 23:46:21.233726447 +0530
> > +++
> > new/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java
> > 2020-07-25 23:46:20.721720857 +0530
> > @@ -96,8 +96,6 @@
> >* @param p the prime modulus
> >* @param g the base generator
> >* @param l the private-value length
> > - *
> > - * @exception InvalidKeyException if the key cannot be encoded
> >*/
> >   DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
> >   this.x = x;
> > ---
> >
> old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
> > 2020-07-25 23:46:22.241737383 +0530
> > +++
> >
> new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
> > 2020-07-25 23:46:21.745732013 +0530
> > @@ -1,5 +1,5 @@
> >   /*
> > - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights
> > reserved.
> > + * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights
> > reserved.
> >* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
> >*
> >* This code is free software; you can redistribute it and/or modify it
> > @@ -208,7 +208,7 @@
> >*
> >* @return a CallSite, which, when invoked, will return an
> instance of
> > the
> >* functional interface
> > - * @throws ReflectiveOperationException
> > + * @throws LambdaConversionException
> >*/
> >   abstract CallSite buildCallSite()
> >   throws LambdaConversionException;
> > ---
> >
> old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
> > 2020-07-25 23:46:23.261748361 +0530
> > +++
> >
> new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
> > 2020-07-25 23:46:22.761742991 +0530
> > @@ -200,7 +200,6 @@
> >*
> >* @return a CallSite, which, when invoked, will return an
> instance of
> > the
> >* functional interface
> > - * @throws ReflectiveOperationException
> >* @throws LambdaConversionException If properly formed functional
> > interface
> >* is not found
> >*/
> > --- old/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
> > 23:46:24.285759291 +0530
> > +++ new/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
> > 23:46:23.785753966 +0530
> > @@ -5413,7 +5413,7 @@
> >*
> >* @param n the numerator; must be negative
> >* @param d the denominator; must not be unity
> > - * @return a two-element {@long} array with the remainder and
> quotient
> > in
> > + * @return a two-element {@code long} array with the remainder and
> > quotient in
> >* the initial and final elements, respectively
> >*/
> >   private static long[] divRemNegativeLong(long n, long d) {
> > --- old/src/java.base/share/classes/java/math/MutableBigInteger.java
> > 2020-07-25 23:46:25.381770889 +0530
> > +++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
> > 2020-07-25 23:46:24.877765572 +0530
> > @@ -145,7 +145,6 @@
> >* Makes this number an {@code n}-int number all of whose bits are
> > ones.
> >* Used by Burnikel-Ziegler division.
> >* @param n number of ints in the {@code value} array
> > - * @return a number equal to {@code ((1<<(32*n)))-1}
> >*/
> >   private void ones(int n) {
> >   if (n > value.length)
> > --- old/src/java.base/share/classes/java/n

Fix for Javadoc errors in java.base

2020-07-27 Thread Vipin Sharma
Hi,

This patch fixes Javadoc errors in java.base, please sponsor this patch and
help to create a bug id for this.
I have signed OCA, this is my third patch.

---
old/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java
2020-07-25 23:46:21.233726447 +0530
+++
new/src/java.base/share/classes/com/sun/crypto/provider/DHPrivateKey.java
2020-07-25 23:46:20.721720857 +0530
@@ -96,8 +96,6 @@
  * @param p the prime modulus
  * @param g the base generator
  * @param l the private-value length
- *
- * @exception InvalidKeyException if the key cannot be encoded
  */
 DHPrivateKey(BigInteger x, BigInteger p, BigInteger g, int l) {
 this.x = x;
---
old/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:22.241737383 +0530
+++
new/src/java.base/share/classes/java/lang/invoke/AbstractValidatingLambdaMetafactory.java
2020-07-25 23:46:21.745732013 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights
reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,7 +208,7 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of
the
  * functional interface
- * @throws ReflectiveOperationException
+ * @throws LambdaConversionException
  */
 abstract CallSite buildCallSite()
 throws LambdaConversionException;
---
old/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:23.261748361 +0530
+++
new/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
2020-07-25 23:46:22.761742991 +0530
@@ -200,7 +200,6 @@
  *
  * @return a CallSite, which, when invoked, will return an instance of
the
  * functional interface
- * @throws ReflectiveOperationException
  * @throws LambdaConversionException If properly formed functional
interface
  * is not found
  */
--- old/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
23:46:24.285759291 +0530
+++ new/src/java.base/share/classes/java/math/BigDecimal.java 2020-07-25
23:46:23.785753966 +0530
@@ -5413,7 +5413,7 @@
  *
  * @param n the numerator; must be negative
  * @param d the denominator; must not be unity
- * @return a two-element {@long} array with the remainder and quotient
in
+ * @return a two-element {@code long} array with the remainder and
quotient in
  * the initial and final elements, respectively
  */
 private static long[] divRemNegativeLong(long n, long d) {
--- old/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-07-25 23:46:25.381770889 +0530
+++ new/src/java.base/share/classes/java/math/MutableBigInteger.java
2020-07-25 23:46:24.877765572 +0530
@@ -145,7 +145,6 @@
  * Makes this number an {@code n}-int number all of whose bits are
ones.
  * Used by Burnikel-Ziegler division.
  * @param n number of ints in the {@code value} array
- * @return a number equal to {@code ((1<<(32*n)))-1}
  */
 private void ones(int n) {
 if (n > value.length)
--- old/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:26.449782093 +0530
+++ new/src/java.base/share/classes/java/net/ServerSocket.java 2020-07-25
23:46:25.937776742 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights
reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -315,7 +315,7 @@
 /**
  * Creates the socket implementation.
  *
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
  * @since 1.4
  */
 void createImpl() throws SocketException {
--- old/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:27.485792869 +0530
+++ new/src/java.base/share/classes/java/net/Socket.java 2020-07-25
23:46:26.973787565 +0530
@@ -533,7 +533,7 @@
  *
  * @param stream a {@code boolean} value : {@code true} for a TCP
socket,
  *   {@code false} for UDP.
- * @throws IOException if creation fails
+ * @throws SocketException if creation fails
  * @since 1.4
  */
  void createImpl(boolean stream) throws SocketException {
---
old/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java
2020-07-25 23:46:28.545803801 +0530
+++
new/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java
2020-07-25 23:46:28.029798501 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All r

Re: Fix for warning related to stream api call chains in java.base

2020-05-19 Thread Vipin Sharma
Hi All,

Forgot to mention these are IDE warnings I am trying to fix, need a sponsor for 
this.

Regards,
Vipin

> On May 3, 2020, at 8:40 PM, Vipin Sharma  wrote:
> 
> Hi All,
> 
> I have fixed some warnings in java.base module, following are 3 type of code 
> changes in this patch:
> 
> ! stream().filter(...).findFirst().isPresent() replaced with  
> stream().noneMatch(...))
> stream.filter(...).findFirst().isPresent() replaced with  stream.anyMatch(...)
> stream.collect(Collectors.joining(",")) replaced with  String.join(",", 
> stringList)
> 
> This patch improves performance as well, jmh results available at 
> https://gist.github.com/Vipin-Sharma/00f1d6da6b8e0e0bc7bec2e33bce85ed 
> <https://gist.github.com/Vipin-Sharma/00f1d6da6b8e0e0bc7bec2e33bce85ed>, end 
> of gist file you can see results. Need a sponsor for this patch.
> 
> Patch:
> 
> --- old/src/java.base/share/classes/java/lang/invoke/MethodHandles.java   
> 2020-05-03 19:44:09.519289354 +0530
> +++ new/src/java.base/share/classes/java/lang/invoke/MethodHandles.java   
> 2020-05-03 19:44:09.087294954 +0530
> @@ -6349,7 +6349,7 @@
>  loopReturnType + ")");
>  }
>  
> -if (!pred.stream().filter(Objects::nonNull).findFirst().isPresent()) 
> {
> +if (pred.stream().noneMatch(Objects::nonNull)) {
>  throw newIllegalArgumentException("no predicate found", pred);
>  }
>  if 
> (pred.stream().filter(Objects::nonNull).map(MethodHandle::type).map(MethodType::returnType).
> --- old/src/java.base/share/classes/java/util/Locale.java 2020-05-03 
> 19:44:10.915271183 +0530
> +++ new/src/java.base/share/classes/java/util/Locale.java 2020-05-03 
> 19:44:10.487276766 +0530
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights 
> reserved.
> + * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights 
> reserved.
>   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>   *
>   * This code is free software; you can redistribute it and/or modify it
> @@ -2250,7 +2250,7 @@
>  // If we have no list patterns, compose the list in a simple,
>  // non-localized way.
>  if (pattern == null) {
> -return 
> Arrays.stream(stringList).collect(Collectors.joining(","));
> +return String.join(",", stringList);
>  }
>  
>  switch (stringList.length) {
> --- old/src/java.base/share/classes/jdk/internal/module/DefaultRoots.java 
> 2020-05-03 19:44:11.911258115 +0530
> +++ new/src/java.base/share/classes/jdk/internal/module/DefaultRoots.java 
> 2020-05-03 19:44:11.479263786 +0530
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights 
> reserved.
> + * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights 
> reserved.
>   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>   *
>   * This code is free software; you can redistribute it and/or modify it
> @@ -74,8 +74,6 @@
>  private static boolean exportsAPI(ModuleDescriptor descriptor) {
>  return descriptor.exports()
>  .stream()
> -.filter(e -> !e.isQualified())
> -.findAny()
> -.isPresent();
> +.anyMatch(e -> !e.isQualified());
>  }
>  }
> --- old/src/java.base/share/classes/sun/launcher/LauncherHelper.java  
> 2020-05-03 19:44:12.863245549 +0530
> +++ new/src/java.base/share/classes/sun/launcher/LauncherHelper.java  
> 2020-05-03 19:44:12.427251308 +0530
> @@ -1142,7 +1142,7 @@
>  ostream.format("uses %s%n", s);
>  }
>  for (Provides ps : md.provides()) {
> -String names = 
> ps.providers().stream().collect(Collectors.joining(" "));
> +String names = String.join(" ", ps.providers());
>  ostream.format("provides %s with %s%n", ps.service(), names);
>  
>  }
> @@ -1150,7 +1150,7 @@
>  // qualified exports
>  for (Exports e : md.exports()) {
>  if (e.isQualified()) {
> -String who = 
> e.targets().stream().collect(Collectors.joining(" "));
> +String who = String.join(" ", e.targets());
>  ostream.format("qualified exports %s to %s%n", e.source(), 
> who);
>  }
>  }
> @@ -1164,7 +1164,7 @@
>  .collect(Collectors.joining(" "));
>  ostream.format("opens %s", sourceAndMods

Fix for warning related to stream api call chains in java.base

2020-05-03 Thread Vipin Sharma
Hi All,

I have fixed some warnings in java.base module, following are 3 type of
code changes in this patch:

! stream().filter(...).findFirst().isPresent() replaced with
 stream().noneMatch(...))
stream.filter(...).findFirst().isPresent() replaced with
 stream.anyMatch(...)
stream.collect(Collectors.joining(",")) replaced with  String.join(",",
stringList)

This patch improves performance as well, jmh results available at
https://gist.github.com/Vipin-Sharma/00f1d6da6b8e0e0bc7bec2e33bce85ed, end
of gist file you can see results. Need a sponsor for this patch.

Patch:

--- old/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
2020-05-03 19:44:09.519289354 +0530
+++ new/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
2020-05-03 19:44:09.087294954 +0530
@@ -6349,7 +6349,7 @@
 loopReturnType + ")");
 }

-if
(!pred.stream().filter(Objects::nonNull).findFirst().isPresent()) {
+if (pred.stream().noneMatch(Objects::nonNull)) {
 throw newIllegalArgumentException("no predicate found", pred);
 }
 if
(pred.stream().filter(Objects::nonNull).map(MethodHandle::type).map(MethodType::returnType).
--- old/src/java.base/share/classes/java/util/Locale.java 2020-05-03
19:44:10.915271183 +0530
+++ new/src/java.base/share/classes/java/util/Locale.java 2020-05-03
19:44:10.487276766 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights
reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2250,7 +2250,7 @@
 // If we have no list patterns, compose the list in a simple,
 // non-localized way.
 if (pattern == null) {
-return
Arrays.stream(stringList).collect(Collectors.joining(","));
+return String.join(",", stringList);
 }

 switch (stringList.length) {
--- old/src/java.base/share/classes/jdk/internal/module/DefaultRoots.java
2020-05-03 19:44:11.911258115 +0530
+++ new/src/java.base/share/classes/jdk/internal/module/DefaultRoots.java
2020-05-03 19:44:11.479263786 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights
reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,8 +74,6 @@
 private static boolean exportsAPI(ModuleDescriptor descriptor) {
 return descriptor.exports()
 .stream()
-.filter(e -> !e.isQualified())
-.findAny()
-.isPresent();
+.anyMatch(e -> !e.isQualified());
 }
 }
--- old/src/java.base/share/classes/sun/launcher/LauncherHelper.java
2020-05-03 19:44:12.863245549 +0530
+++ new/src/java.base/share/classes/sun/launcher/LauncherHelper.java
2020-05-03 19:44:12.427251308 +0530
@@ -1142,7 +1142,7 @@
 ostream.format("uses %s%n", s);
 }
 for (Provides ps : md.provides()) {
-String names =
ps.providers().stream().collect(Collectors.joining(" "));
+String names = String.join(" ", ps.providers());
 ostream.format("provides %s with %s%n", ps.service(), names);

 }
@@ -1150,7 +1150,7 @@
 // qualified exports
 for (Exports e : md.exports()) {
 if (e.isQualified()) {
-String who =
e.targets().stream().collect(Collectors.joining(" "));
+String who = String.join(" ", e.targets());
 ostream.format("qualified exports %s to %s%n", e.source(),
who);
 }
 }
@@ -1164,7 +1164,7 @@
 .collect(Collectors.joining(" "));
 ostream.format("opens %s", sourceAndMods);
 if (opens.isQualified()) {
-String who =
opens.targets().stream().collect(Collectors.joining(" "));
+String who = String.join(" ", opens.targets());
 ostream.format(" to %s", who);
 }
 ostream.println();
---
old/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java
2020-05-03 19:44:14.143228540 +0530
+++
new/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java
2020-05-03 19:44:13.711234292 +0530
@@ -380,7 +380,7 @@
 return parse(oset);
 } catch (OptionException ex) {
 if (ex.options().isEmpty()) {
-msg("jshell.err.opt.invalid",
stream(args).collect(joining(", ")));
+msg("j

Re: Need sponsor to fix Javadoc warnings

2020-04-15 Thread Vipin Sharma
Thanks Pavel, I will keep this in mind for future patches.

> On Apr 15, 2020, at 10:22 PM, Pavel Rappo  wrote:
> 
> Vipin,
> 
> After a private exchange with Naoto Sato, who is fluent in that area, I 
> decided
> to leave out all the changes to the jdk.internal.icu package from the 
> changeset.
> 
> The reason is quite simple. A significant portion of code in jdk.internal.icu
> comes from an upstream project, ICU4J. Making OpenJDK-local changes to it 
> makes
> it harder to merge when updating from upstream. 
> 
> Before I created that latter webrev I found that there were OpenJDK-local
> changes to that package. Still, the argument holds and we should not aggravate
> already existing difficulties.
> 
> -Pavel
> 
> P.S. If you care about those changes, you may want to ask ICU4J [^1] folk to
> incorporate them. If they agree, one day those changes may show up in the 
> OpenJDK.
> 
> --
> [^1]: https://github.com/unicode-org/icu/tree/master/icu4j
> 
>> On 15 Apr 2020, at 12:06, Pavel Rappo  wrote:
>> 
>> Vipin,
>> 
>> I saw that Max had already reviewed that incremental patch. That's good.
>> 
>> I couldn't resist fixing a couple of typos in the already affected 
>> jdk.internal.icu
>> (International Components for Unicode) package. Once this has been cleared by
>> experts in that area, we are good to go.
>> 
>> Here's the cumulative webrev:
>> 
>>   http://cr.openjdk.java.net/~prappo/8242366/webrev.01/
>> 
>> -Pavel
>> 
>>> On 11 Apr 2020, at 20:23, Vipin Sharma  wrote:
>>> 
>>> Hi Pavel,
>>> 
>>>> On Apr 9, 2020, at 2:45 AM, Pavel Rappo  wrote:
>>>> 
>>>> If your new patch addresses a similar type of problem, please send it in 
>>>> reply to this email,
>>>> so that I could merge it with the existing patch. Let's try to minimize 
>>>> process overhead if possible.
>>>> 
>>> This is additional patch:
>>> 
>>> --- old/src/java.base/share/classes/jdk/internal/icu/text/StringPrep.java   
>>> 2020-04-12 00:33:54.818724363 +0530
>>> +++ new/src/java.base/share/classes/jdk/internal/icu/text/StringPrep.java   
>>> 2020-04-12 00:33:54.398714466 +0530
>>> @@ -142,7 +142,7 @@
>>>  /**
>>>   * Called by com.ibm.icu.util.Trie to extract from a lead surrogate's
>>>   * data the index array offset of the indexes for that lead surrogate.
>>> -* @param property data value for a surrogate from the trie, 
>>> including
>>> +* @param value data value for a surrogate from the trie, including
>>>   *the folding offset
>>>   * @return data offset or 0 if there is no data for the lead surrogate
>>>   */
>>> --- 
>>> old/src/java.base/share/classes/sun/net/www/content/text/PlainTextInputStream.java
>>>   2020-04-12 00:33:55.778746974 +0530
>>> +++ 
>>> new/src/java.base/share/classes/sun/net/www/content/text/PlainTextInputStream.java
>>>   2020-04-12 00:33:55.346736801 +0530
>>> @@ -1,5 +1,5 @@
>>> /*
>>> - * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
>>> + * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights 
>>> reserved.
>>> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>>> *
>>> * This code is free software; you can redistribute it and/or modify it
>>> @@ -39,7 +39,7 @@
>>> 
>>>   /**
>>>* Calls FilterInputStream's constructor.
>>> - * @param an InputStream
>>> + * @param is an InputStream
>>>*/
>>>   PlainTextInputStream(InputStream is) {
>>>   super(is);
>>> --- 
>>> old/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java
>>>2020-04-12 00:33:56.726769287 +0530
>>> +++ 
>>> new/src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java
>>>2020-04-12 00:33:56.306759403 +0530
>>> @@ -1,5 +1,5 @@
>>> /*
>>> - * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights 
>>> reserved.
>>> + * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights 
>>> reserved.
>>> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>>> *
>>> * This code is free software; you can redistribute it and/or modify it
>>> @@ -881,7 +881,7 @@
>>>* only CRLs signed with a different key (bu

Re: Need sponsor to fix Javadoc warnings

2020-04-11 Thread Vipin Sharma
d.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -193,7 +193,7 @@
 /**
  * Constructs an object to store the response to a timestamp request.
  *
- * @param status A buffer containing the ASN.1 BER encoded response.
+ * @param tsReply A buffer containing the ASN.1 BER encoded response.
  * @throws IOException The exception is thrown if a problem is encountered
  * parsing the timestamp response.
  */


>> On 8 Apr 2020, at 17:35, Vipin Sharma  wrote:
>> 
>> 
>> 
>>> On Apr 8, 2020, at 6:57 PM, Pavel Rappo  wrote:
>>> 
>>> Why assume something that sophisticated where it can be adequately 
>>> explained by
>>> a simpler thing? :) I bet it was an IDE inspection.
>>> 
>>> -Pavel
>> 
>> Yes, it was IDE inspection in java.base, it looked like the best way to 
>> start contributing and understand the process.
>> If it helps and not creating noise for you all, I see an opportunity for one 
>> more such patch. What do you think?
>> 
>>> 
>>>> On 8 Apr 2020, at 14:14, Alan Bateman  wrote:
>>>> 
>>>> On 08/04/2020 14:07, Daniel Fuchs wrote:
>>>>> Hi Pavel,
>>>>> 
>>>>> On 08/04/2020 13:56, David Holmes wrote:
>>>>>> and `@exception` tags for checked exceptions that were neither thrown
>>>>>> nor imported
>>>>> 
>>>>> Hopefully that's only on internal classes.
>>>> From a quick scan, the changes are to internal classes and a few 
>>>> non-public elements of public API classes. So I don't think anything 
>>>> should impact the javadoc. I'm guessing this patch is motivated by 
>>>> something creating that is running the javadoc tool with different options 
>>>> to what the "docs" target uses.
>>>> 
>>>> -Alan
>>> 
>> 
>> Regards,
>> Vipin
> 
Regards,
Vipin



Re: Need sponsor to fix Javadoc warnings

2020-04-08 Thread Vipin Sharma



> On Apr 8, 2020, at 6:57 PM, Pavel Rappo  wrote:
> 
> Why assume something that sophisticated where it can be adequately explained 
> by
> a simpler thing? :) I bet it was an IDE inspection.
> 
> -Pavel

Yes, it was IDE inspection in java.base, it looked like the best way to start 
contributing and understand the process.
If it helps and not creating noise for you all, I see an opportunity for one 
more such patch. What do you think?

> 
>> On 8 Apr 2020, at 14:14, Alan Bateman  wrote:
>> 
>> On 08/04/2020 14:07, Daniel Fuchs wrote:
>>> Hi Pavel,
>>> 
>>> On 08/04/2020 13:56, David Holmes wrote:
 and `@exception` tags for checked exceptions that were neither thrown
 nor imported
>>> 
>>> Hopefully that's only on internal classes.
>> From a quick scan, the changes are to internal classes and a few non-public 
>> elements of public API classes. So I don't think anything should impact the 
>> javadoc. I'm guessing this patch is motivated by something creating that is 
>> running the javadoc tool with different options to what the "docs" target 
>> uses.
>> 
>> -Alan
> 

Regards,
Vipin

Re: Need sponsor to fix Javadoc warnings

2020-04-07 Thread Vipin Sharma
.java  
2020-04-06 00:19:26.618178853 +0530
+++ new/src/java.base/share/classes/sun/text/DictionaryBasedBreakIterator.java  
2020-04-06 00:19:26.210177291 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -111,7 +111,7 @@
  * @param ruleFile   the name of the rule data file
  * @param ruleData   the rule data loaded from the rule data file
  * @param dictionaryFile the name of the dictionary file
- * @param dictionartData the dictionary data loaded from the dictionary 
file
+ * @param dictionaryData the dictionary data loaded from the dictionary 
file
  * @throws MissingResourceException if rule data or dictionary 
initialization failed
  */
 public DictionaryBasedBreakIterator(String ruleFile, byte[] ruleData,


>> On 6 Apr 2020, at 17:07, Vipin Sharma  wrote:
>> 
>> Hi David,
>> 
>> I forgot to mention this is my second patch here. I am new to this project, 
>> as per my understanding we need to contribute 3 patches to get user id and 
>> space on cr.openjdk.java.net, for now I need sponsor who can create bug id 
>> and upload this webrev on cr.openjdk.java.net
>> Please suggest if there is any way I can create my user id to upload this 
>> patch.
>> 
>> This is ~300 line patch file. 
>> 
>> Regards,
>> Vipin
>> 
>>> On Apr 6, 2020, at 3:25 AM, David Holmes  wrote:
>>> 
>>> Hi Vipin,
>>> 
>>> On 6/04/2020 6:42 am, Vipin Sharma wrote:
>>>> Hi,
>>>> I have fixed a few warnings where the method parameter name is different in
>>>> code and Javadoc, need a sponsor for this patch.
>>>> Webrev is available at
>>>> https://drive.google.com/open?id=1EXUXKqGxzSR7sW2LShy0sgvP4z-bPL0e
>>> 
>>> webrevs needs to be hosted on OpenJDK systems - either cr.openjdk.java.net, 
>>> or inline in an email to the list (not an attachment) if small enough.
>>> 
>>> Thanks,
>>> David
>>> 
>>>> Regards,
>>>> Vipin
>> 
> 
Thanks,
Vipin



Re: Need sponsor to fix Javadoc warnings

2020-04-06 Thread Vipin Sharma
Hi David,

I forgot to mention this is my second patch here. I am new to this project, as 
per my understanding we need to contribute 3 patches to get user id and space 
on cr.openjdk.java.net, for now I need sponsor who can create bug id and upload 
this webrev on cr.openjdk.java.net
Please suggest if there is any way I can create my user id to upload this patch.

This is ~300 line patch file. 

Regards,
Vipin

> On Apr 6, 2020, at 3:25 AM, David Holmes  wrote:
> 
> Hi Vipin,
> 
> On 6/04/2020 6:42 am, Vipin Sharma wrote:
>> Hi,
>> I have fixed a few warnings where the method parameter name is different in
>> code and Javadoc, need a sponsor for this patch.
>> Webrev is available at
>> https://drive.google.com/open?id=1EXUXKqGxzSR7sW2LShy0sgvP4z-bPL0e
> 
> webrevs needs to be hosted on OpenJDK systems - either cr.openjdk.java.net, 
> or inline in an email to the list (not an attachment) if small enough.
> 
> Thanks,
> David
> 
>> Regards,
>> Vipin



Need sponsor to fix Javadoc warnings

2020-04-05 Thread Vipin Sharma
Hi,

I have fixed a few warnings where the method parameter name is different in
code and Javadoc, need a sponsor for this patch.
Webrev is available at
https://drive.google.com/open?id=1EXUXKqGxzSR7sW2LShy0sgvP4z-bPL0e

Regards,
Vipin


RFR 8240524: Removed warnings from test classes

2020-03-05 Thread Vipin Sharma
Hi All,

Please review patch to remove warnings from test classes.

Bug : https://bugs.openjdk.java.net/browse/JDK-8240524 

Webrev : http://cr.openjdk.java.net/~clanger/webrevs/8240524.0/ 



Change description:

Class: test/jdk/java/lang/Boolean/GetBoolean.java
Fixed following warning:
1. "Exception 'java.lang.Exception' is never thrown in the method”

Class: test/jdk/java/lang/Boolean/MakeBooleanComparable.java
Fixed following warnings:
1. Explicit type argument Boolean can be replaced with <> 
2. C-style array declaration of parameter 'args' 

Class: test/jdk/java/lang/Boolean/ParseBoolean.java
Fixed following warning:
1. Exception 'java.lang.Exception' is never thrown in the method


Regards,
Vipin

Need bug id to remove the explicit type argument in test class

2020-03-02 Thread Vipin Sharma
Hi,

My OCA has been processed recently and I want to start Contributing to
OpenJDK.

As a first fix, I would like to remove the explicit type argument in test
class test/jdk/java/lang/Boolean/MakeBooleanComparable.java to fix one
warning.

The first line given below is the existing code and the second line is what
I am changing it to.

List list = new ArrayList();
List list = new ArrayList<>();

If this is not too small change to start with, could you please help me to
create a bug id against this so that I can create a patch and share.

Regards,
Vipin