RFR: 8261161: Clean up warnings in hotspot/jtreg/vmTestbase tests

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8261161: Clean up warnings in hotspot/jtreg/vmTestbase tests

Harold Seigel-2
Please review this change to clean up warnings, such as the following, in the vmTestbase tests.  

warning: [synchronization] attempt to synchronize on an instance of a value-based class
warning: [removal] Integer(int) in Integer has been deprecated and marked for removal

This change cleans up the warnings by using a non-value based class to synchronize on, and replacing calls such as Integer(int) with Integer.valueOf(int).

The change was tested by running Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-8 on Linux x64.

Thanks, Harold

-------------

Commit messages:
 - 8261161: Clean up warnings in hotspot/jtreg/vmTestbase tests

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

PR: https://git.openjdk.java.net/jdk/pull/2427
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261161: Clean up warnings in hotspot/jtreg/vmTestbase tests

Lois Foltan-3
On Fri, 5 Feb 2021 14:48:25 GMT, Harold Seigel <[hidden email]> wrote:

> Please review this change to clean up warnings, such as the following, in the vmTestbase tests.  
>
> warning: [synchronization] attempt to synchronize on an instance of a value-based class
> warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
>
> This change cleans up the warnings by using a non-value based class to synchronize on, and replacing calls such as Integer(int) with Integer.valueOf(int).
>
> The change was tested by running Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-8 on Linux x64.
>
> Thanks, Harold

Looks good.
Lois

-------------

Marked as reviewed by lfoltan (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2427
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8261161: Clean up warnings in hotspot/jtreg/vmTestbase tests

Coleen Phillimore-3
In reply to this post by Harold Seigel-2
On Fri, 5 Feb 2021 14:48:25 GMT, Harold Seigel <[hidden email]> wrote:

> Please review this change to clean up warnings, such as the following, in the vmTestbase tests.  
>
> warning: [synchronization] attempt to synchronize on an instance of a value-based class
> warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
>
> This change cleans up the warnings by using a non-value based class to synchronize on, and replacing calls such as Integer(int) with Integer.valueOf(int).
>
> The change was tested by running Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-8 on Linux x64.
>
> Thanks, Harold

Wow. thank you!

-------------

Marked as reviewed by coleenp (Reviewer).

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