Re: RFR: JDK-8281001 Class::forName(String) defaults to system class loader if the caller is null [v5]

2022-06-07 Thread Mandy Chung
On Wed, 8 Jun 2022 02:40:15 GMT, Tim Prinzing  wrote:

>> The Class::forName behavior change to match JNI FindClass is a compatible 
>> change and seems pretty attractive as it would be expected that 
>> Class::forName would give the same behavior as FindClass which uses the 
>> system classloader.  The test for 8281006 was enhanced to test for this 
>> change.  Merged master to pick up fixes to unrelated test failures to reduce 
>> noise.
>
> Tim Prinzing has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains eight commits:
> 
>  - formatting improvement
>  - Merge branch 'master' into JDK-8281001
>  - Fixed the build of the native c++ test NullCallerTest to specify
>the c++ std library as part of the build.  Changed the test to
>use iostream instead of printf.  Enabled the test for Class::forName
>which is now located in test/jdk/jni/nullCaller (as part of the
>merge of JDK-8287171).
>  - Merge branch 'master' into JDK-8281001
>  - make javadoc consistent with other caller sensitve methods
>  - Added javadoc comment
>  - Merge branch 'master' into JDK-8281001
>  - JDK-8281001 Examine the behavior of Class::forName if the caller is null

Looks good.  Thanks for refactoring the tests, making the addition of a new 
test case much cleaner.

test/jdk/jni/nullCaller/NullCallerTest.java line 27:

> 25: /**
> 26:  * @test
> 27:  * @bug 8280902 8281000 8281001 8281003 8281006

nit: append the bug rather than keeping the list in an increasing order.

-

Marked as reviewed by mchung (Reviewer).

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


Re: RFR: JDK-8281001 Class::forName(String) defaults to system class loader if the caller is null [v5]

2022-06-07 Thread Tim Prinzing
> The Class::forName behavior change to match JNI FindClass is a compatible 
> change and seems pretty attractive as it would be expected that 
> Class::forName would give the same behavior as FindClass which uses the 
> system classloader.  The test for 8281006 was enhanced to test for this 
> change.  Merged master to pick up fixes to unrelated test failures to reduce 
> noise.

Tim Prinzing has updated the pull request with a new target base due to a merge 
or a rebase. The pull request now contains eight commits:

 - formatting improvement
 - Merge branch 'master' into JDK-8281001
 - Fixed the build of the native c++ test NullCallerTest to specify
   the c++ std library as part of the build.  Changed the test to
   use iostream instead of printf.  Enabled the test for Class::forName
   which is now located in test/jdk/jni/nullCaller (as part of the
   merge of JDK-8287171).
 - Merge branch 'master' into JDK-8281001
 - make javadoc consistent with other caller sensitve methods
 - Added javadoc comment
 - Merge branch 'master' into JDK-8281001
 - JDK-8281001 Examine the behavior of Class::forName if the caller is null

-

Changes: https://git.openjdk.java.net/jdk/pull/8711/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8711=04
  Stats: 15 lines in 4 files changed: 8 ins; 3 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8711.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8711/head:pull/8711

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