RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-11 Thread Tim Prinzing
JDK-8281003 - MethodHandles::lookup throws NPE if caller is null - Commit messages: - Merge branch 'master' into JDK-8281003 - Merge branch 'master' into JDK-8281003 - removed commented out code - Moved null caller MethodHandles.lookup() test to a more reasonable location - JDK-8

RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-11 Thread Tim Prinzing
JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null - Commit messages: - Merge branch 'master' into JDK-8281000 - JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null Changes: https://git.openjdk.java.net/jdk/pull/7448/files

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-11 Thread Tim Prinzing
On Fri, 11 Feb 2022 20:36:26 GMT, Tim Prinzing wrote: > JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Yes, I like the IllegalCallerException. - PR: https://git.openjdk.java.net/jdk/pull/7448

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null [v2]

2022-02-14 Thread Tim Prinzing
> JDK-8281003 - MethodHandles::lookup throws NPE if caller is null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: Changes from feedback. - Improved javadoc. - Single copyright date in new files. - Informative string

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null [v3]

2022-02-14 Thread Tim Prinzing
> JDK-8281003 - MethodHandles::lookup throws NPE if caller is null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: missing dot - Changes: - all: https://git.openjdk.java.net/jdk/pull/7447/files - new: ht

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null [v4]

2022-02-14 Thread Tim Prinzing
> JDK-8281003 - MethodHandles::lookup throws NPE if caller is null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: remove excess description - Changes: - all: https://git.openjdk.java.net/jdk/pull/7447/files -

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null [v2]

2022-02-15 Thread Tim Prinzing
> JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: Changes from feedback. - Copyright dates fixed - IllegalCallerException thrown for no

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null [v3]

2022-02-16 Thread Tim Prinzing
> JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: More changes from feedback. The javadoc is improved to reflect InvalidCallerException is

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null [v4]

2022-02-16 Thread Tim Prinzing
> JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: fix copyright date - Changes: - all: https://git.openjdk.java.net/jdk/pul

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null [v5]

2022-02-16 Thread Tim Prinzing
> JDK-8281003 - MethodHandles::lookup throws NPE if caller is null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: fix copyright date - Changes: - all: https://git.openjdk.java.net/jdk/pull/7447/files - new: ht

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null [v5]

2022-02-16 Thread Tim Prinzing
> JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Tim Prinzing has updated the pull request incrementally with three additional commits since the last revision: - reformat test summary - reformat test summary - improve test name and remove experimenta

Integrated: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-16 Thread Tim Prinzing
On Fri, 11 Feb 2022 20:32:46 GMT, Tim Prinzing wrote: > JDK-8281003 - MethodHandles::lookup throws NPE if caller is null This pull request has now been integrated. Changeset: 67763df4 Author: Tim Prinzing Committer: Mandy Chung URL: https://git.openjdk.java.net/jdk/com

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null [v6]

2022-02-16 Thread Tim Prinzing
> JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: fix test breakage from rename - Changes: - all: https://git.openjdk.java.n

Re: RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null [v7]

2022-02-16 Thread Tim Prinzing
> JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null Tim Prinzing has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: - Merge master - fix test breakage from rename - reformat test s

Integrated: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

2022-02-17 Thread Tim Prinzing
On Fri, 11 Feb 2022 20:36:26 GMT, Tim Prinzing wrote: > JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is > null This pull request has now been integrated. Changeset: a6f8a386 Author: Tim Prinzing Committer: Mandy Chung URL: https://git.openjdk.ja

RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame

2022-03-02 Thread Tim Prinzing
The caller class returned by Reflection::getCallerClass was used to gain access to it's module in most cases and class loader in one case. I added a method to translate the caller class to caller module so that the decision of what module represents the caller with no stack frame is made in a si

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v2]

2022-03-02 Thread Tim Prinzing
location added to the classpath, fetches a string out of the bundle and > verifies it, and calls clearCache. > > The javadoc was updated for the caller sensitive methods changed. Tim Prinzing has updated the pull request incrementally with one additional commit since the

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v3]

2022-03-02 Thread Tim Prinzing
location added to the classpath, fetches a string out of the bundle and > verifies it, and calls clearCache. > > The javadoc was updated for the caller sensitive methods changed. Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v3]

2022-03-03 Thread Tim Prinzing
On Wed, 2 Mar 2022 22:21:03 GMT, Mandy Chung wrote: >> Tim Prinzing has updated the pull request incrementally with one additional >> commit since the last revision: >> >> suggested changes > > test/jdk/java/util/ResourceBundle/exeNullCallerResourceBundle

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v4]

2022-03-03 Thread Tim Prinzing
location added to the classpath, fetches a string out of the bundle and > verifies it, and calls clearCache. > > The javadoc was updated for the caller sensitive methods changed. Tim Prinzing has updated the pull request incrementally with one additional commit since the last revisi

Re: RFR: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame [v5]

2022-03-08 Thread Tim Prinzing
location added to the classpath, fetches a string out of the bundle and > verifies it, and calls clearCache. > > The javadoc was updated for the caller sensitive methods changed. Tim Prinzing has updated the pull request with a new target base due to a merge or a rebase. The increm

Integrated: JDK-8280902 ResourceBundle::getBundle may throw NPE when invoked by JNI code with no caller frame

2022-03-08 Thread Tim Prinzing
On Wed, 2 Mar 2022 18:56:40 GMT, Tim Prinzing wrote: > The caller class returned by Reflection::getCallerClass was used to gain > access to it's module in most cases and class loader in one case. I added a > method to translate the caller class to caller module so that the decis

RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null

2022-04-06 Thread Tim Prinzing
Created a test called NullCallerGetResource to test Module::getResourceAsStream and Class::getResourceAsStream from the native level. At the java level the test builds a test module called 'n' which opens the package 'open' to everyone. There is also a package 'closed' which is neither opened o

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v2]

2022-04-06 Thread Tim Prinzing
ream("test.txt") == null); > assert(n.getResourceAsStream("closed/test.txt") == null); > > The test initially threw an NPE when trying to fetch the open resource. The > Module class was fixed by removing the fragment with the (caller == null) > test in getResourc

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v2]

2022-04-07 Thread Tim Prinzing
On Thu, 7 Apr 2022 05:52:24 GMT, Alan Bateman wrote: > Tim - this creates a conflict between the spec and implementation, the > changes to the 2-arg isOpen method need to be dropped so that it continues to > throw NPE if module is null. okay - PR: https://git.openjdk.java.net/jdk

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v3]

2022-04-07 Thread Tim Prinzing
ream("test.txt") == null); > assert(n.getResourceAsStream("closed/test.txt") == null); > > The test initially threw an NPE when trying to fetch the open resource. The > Module class was fixed by removing the fragment with the (caller == null) > test in getResourc

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v4]

2022-04-10 Thread Tim Prinzing
ream("test.txt") == null); > assert(n.getResourceAsStream("closed/test.txt") == null); > > The test initially threw an NPE when trying to fetch the open resource. The > Module class was fixed by removing the fragment with the (caller == null) > test in getResourc

Re: RFR: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null [v5]

2022-04-19 Thread Tim Prinzing
ream("test.txt") == null); > assert(n.getResourceAsStream("closed/test.txt") == null); > > The test initially threw an NPE when trying to fetch the open resource. The > Module class was fixed by removing the fragment with the (caller == null) > test in getResourc

Integrated: JDK-8281006 Module::getResourceAsStream should check if the resource is open unconditionally when caller is null

2022-04-20 Thread Tim Prinzing
On Thu, 7 Apr 2022 00:38:07 GMT, Tim Prinzing wrote: > Created a test called NullCallerGetResource to test > Module::getResourceAsStream and Class::getResourceAsStream from the native > level. > > At the java level the test builds a test module called 'n' which opens

RFR: 8287171: Refactor null caller tests to a single directory

2022-05-28 Thread Tim Prinzing
Created a test at test/jdk/jdk/nullCaller called NullCallerTest that creates a test module with some resources in it for the actual tests that occur at the native level. The native part was switched to c++ instead of c to make it easier to create helper objects that reduce the redundant code per

Re: RFR: 8287171: Refactor null caller tests to a single directory [v2]

2022-05-29 Thread Tim Prinzing
he redundant code performing > error checking. The two helper classes InstanceCall and StaticCall were > placed in an include file called CallHelper.hpp. The main part of the tests > are in exeNullCallerTest.cpp, and there is a separate function for each of > the bug reports. Tim

Re: RFR: 8287171: Refactor null caller tests to a single directory [v3]

2022-05-29 Thread Tim Prinzing
he redundant code performing > error checking. The two helper classes InstanceCall and StaticCall were > placed in an include file called CallHelper.hpp. The main part of the tests > are in exeNullCallerTest.cpp, and there is a separate function for each of > the bug reports. Tim

Re: RFR: 8287171: Refactor null caller tests to a single directory [v4]

2022-05-31 Thread Tim Prinzing
he redundant code performing > error checking. The two helper classes InstanceCall and StaticCall were > placed in an include file called CallHelper.hpp. The main part of the tests > are in exeNullCallerTest.cpp, and there is a separate function for each of > the bug reports. Tim

Re: RFR: 8287171: Refactor null caller tests to a single directory [v5]

2022-05-31 Thread Tim Prinzing
he redundant code performing > error checking. The two helper classes InstanceCall and StaticCall were > placed in an include file called CallHelper.hpp. The main part of the tests > are in exeNullCallerTest.cpp, and there is a separate function for each of > the bug reports. Tim

Re: RFR: 8287171: Refactor null caller tests to a single directory [v5]

2022-05-31 Thread Tim Prinzing
On Wed, 1 Jun 2022 02:45:24 GMT, Tim Prinzing wrote: >> Created a test at test/jdk/jdk/nullCaller called NullCallerTest that creates >> a test module with some resources in it for the actual tests that occur at >> the native level. The native part was switched to c++ in

Re: RFR: 8287171: Refactor null caller tests to a single directory [v6]

2022-05-31 Thread Tim Prinzing
he redundant code performing > error checking. The two helper classes InstanceCall and StaticCall were > placed in an include file called CallHelper.hpp. The main part of the tests > are in exeNullCallerTest.cpp, and there is a separate function for each of > the bug reports. Tim

Re: RFR: 8287171: Refactor null caller tests to a single directory [v7]

2022-06-01 Thread Tim Prinzing
he redundant code performing > error checking. The two helper classes InstanceCall and StaticCall were > placed in an include file called CallHelper.hpp. The main part of the tests > are in exeNullCallerTest.cpp, and there is a separate function for each of > the bug reports. Tim

Re: RFR: 8287171: Refactor null caller tests to a single directory [v8]

2022-06-01 Thread Tim Prinzing
he redundant code performing > error checking. The two helper classes InstanceCall and StaticCall were > placed in an include file called CallHelper.hpp. The main part of the tests > are in exeNullCallerTest.cpp, and there is a separate function for each of > the bug reports. Tim

Integrated: 8287171: Refactor null caller tests to a single directory

2022-06-02 Thread Tim Prinzing
On Sat, 28 May 2022 11:50:19 GMT, Tim Prinzing wrote: > Created a test at test/jdk/jdk/nullCaller called NullCallerTest that creates > a test module with some resources in it for the actual tests that occur at > the native level. The native part was switched to c++ instead of c t

RFR: 8287745 jni/nullCaller/NullCallerTest.java fails with "exitValue = 1"

2022-06-03 Thread Tim Prinzing
Fixed JtregNativeJdk.gmk to include c++ libs for NullCallerTest - Commit messages: - 8287745 Fix JtregNativeJdk.gmk to include c++ libs for NullCallerTest Changes: https://git.openjdk.java.net/jdk/pull/9010/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9010&range=00

Re: RFR: 8287745 jni/nullCaller/NullCallerTest.java fails with "exitValue = 1"

2022-06-03 Thread Tim Prinzing
On Fri, 3 Jun 2022 18:16:53 GMT, Mandy Chung wrote: >> Fixed JtregNativeJdk.gmk to include c++ libs for NullCallerTest > > make/test/JtregNativeJdk.gmk line 67: > >> 65: BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX) jvm.lib >> 66: BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokea

Re: RFR: 8287745 jni/nullCaller/NullCallerTest.java fails with "exitValue = 1"

2022-06-06 Thread Tim Prinzing
On Mon, 6 Jun 2022 07:45:16 GMT, David Holmes wrote: > Hi Tim, > > Sorry but I have to ask why this test was created as a C++ program instead of > keeping it as a C program likes it predecessors? No need for C++ libs or > special exception handling flags in that case. The idea was to reduce d

Integrated: 8287745 jni/nullCaller/NullCallerTest.java fails with "exitValue = 1"

2022-06-07 Thread Tim Prinzing
On Fri, 3 Jun 2022 07:56:38 GMT, Tim Prinzing wrote: > Fixed JtregNativeJdk.gmk to include c++ libs for NullCallerTest This pull request has now been integrated. Changeset: 96641c0c Author: Tim Prinzing Committer: Mandy Chung URL: https://git.openjdk.java.net/jdk/com