[15] RFR: 8214694: cleanup rawtypes warnings in open jndi tests

Chris Yin xu.y.yin at oracle.com
Fri Mar 27 08:30:41 UTC 2020

Hi, Joe

Thank you for reviewing and comments. 

I agree that some part of the change could be as precise as they could be, and yes, after fix them, a round of redundant “cast” warnings just show up as you mentioned, both fixed now
For rest of them, I could see most are due to the API return value or parameter are imprecise (such as Class.forName, Context.getEnvironment etc), to avoid useless cast, just kept the same declaration, please kindly advise if you have any suggestion about that too, thanks. Updated webrev as below



> On 27 Mar 2020, at 4:41 AM, Joe Darcy <joe.darcy at oracle.com> wrote:
> Hi Chris,
> The changes don't appear incorrect, but at least from a cursory inspection, they don't appear as precise as they could be. Usually generifying a classes like this will next yield a round of redundant "cast" warnings; in my cleanup efforts, getting cast warnings was usually a sign the right generifiation was found.
> HTH,
> -Joe
> On 3/25/2020 12:57 AM, Chris Yin wrote:
>> Hello
>> Please review following simple changes to cleanup raw types warning for open jndi tests (under test/jdk/com/sun/jndi and test/jdk/javax/naming), thanks
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8214694
>> Webrev: http://cr.openjdk.java.net/~xyin/8214694/webrev.00/
>> The changes should be straightforward, only fix raw types warnings, no test logic change, no code optimization or cleanup. Minor change to each test file, just a little surprised about the affected tests count, hope this covers all. Run related jndi tests on 4 platforms for total 200 times, all passed.
>> Thanks,
>> Chris

More information about the core-libs-dev mailing list