Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v2]

2024-10-11 Thread ExE Boss
On Fri, 11 Oct 2024 16:21:30 GMT, Chen Liang wrote: >> Please review this patch that adds a test by @nizarbenalla to perform null >> checks across the ClassFile API. This is an updated version of #20556 that >> minimizes impact on our implementation code. >> >> Notes: >> 1. There's one change

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v2]

2024-10-11 Thread Adam Sotona
On Fri, 11 Oct 2024 16:21:30 GMT, Chen Liang wrote: >> Please review this patch that adds a test by @nizarbenalla to perform null >> checks across the ClassFile API. This is an updated version of #20556 that >> minimizes impact on our implementation code. >> >> Notes: >> 1. There's one change

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread Chen Liang
On Thu, 10 Oct 2024 19:13:01 GMT, Chen Liang wrote: > Please review this patch that adds a test by @nizarbenalla to perform null > checks across the ClassFile API. This is an updated version of #20556 that > minimizes impact on our implementation code. > > Notes: > 1. There's one change in `Me

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v2]

2024-10-11 Thread Chen Liang
> Please review this patch that adds a test by @nizarbenalla to perform null > checks across the ClassFile API. This is an updated version of #20556 that > minimizes impact on our implementation code. > > Notes: > 1. There's one change in `MethodHandleProxies` to explicitly use platform > class

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread Chen Liang
On Fri, 11 Oct 2024 15:57:50 GMT, Adam Sotona wrote: >> Please review this patch that adds a test by @nizarbenalla to perform null >> checks across the ClassFile API. This is an updated version of #20556 that >> minimizes impact on our implementation code. >> >> Notes: >> 1. There's one change

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread Adam Sotona
On Fri, 11 Oct 2024 16:02:29 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java >> line 276: >> >>> 274: @Override >>> 275: public ClassDesc map(ClassDesc desc) { >>> 276: if (desc == null) return null; >> >> I'm not sure th

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread Adam Sotona
On Thu, 10 Oct 2024 19:13:01 GMT, Chen Liang wrote: > Please review this patch that adds a test by @nizarbenalla to perform null > checks across the ClassFile API. This is an updated version of #20556 that > minimizes impact on our implementation code. > > Notes: > 1. There's one change in `Me

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread Adam Sotona
On Thu, 10 Oct 2024 19:13:01 GMT, Chen Liang wrote: > Please review this patch that adds a test by @nizarbenalla to perform null > checks across the ClassFile API. This is an updated version of #20556 that > minimizes impact on our implementation code. > > Notes: > 1. There's one change in `Me

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread Chen Liang
On Fri, 11 Oct 2024 09:35:35 GMT, ExE Boss wrote: >> test/jdk/jdk/classfile/NullHostileTest.java line 1: >> >>> 1: /* >> >> I'm a bit worried about maintainability of such complex parametrized test >> with hard-listed method signatures in a text form. I would recommend to find >> better locat

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread ExE Boss
On Fri, 11 Oct 2024 07:55:44 GMT, Adam Sotona wrote: >> Please review this patch that adds a test by @nizarbenalla to perform null >> checks across the ClassFile API. This is an updated version of #20556 that >> minimizes impact on our implementation code. >> >> Notes: >> 1. There's one change

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-11 Thread Adam Sotona
On Thu, 10 Oct 2024 19:13:01 GMT, Chen Liang wrote: > Please review this patch that adds a test by @nizarbenalla to perform null > checks across the ClassFile API. This is an updated version of #20556 that > minimizes impact on our implementation code. > > Notes: > 1. There's one change in `Me

RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-10-10 Thread Chen Liang
Please review this patch that adds a test by @nizarbenalla to perform null checks across the ClassFile API. This is an updated version of #20556 that minimizes impact on our implementation code. Notes: 1. There's one change in `MethodHandleProxies` to explicitly use platform class loader instea

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Adam Sotona
On Fri, 6 Sep 2024 13:39:43 GMT, Chen Liang wrote: >> The test fails if the method does not throw an exception or throws anything >> other than a NPE. That's why I added `requireNonNull` here. >> >> What exceptions would be considered ok when nulls are provided? > > I think we should prefer NPE

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 12:40:15 GMT, Nizar Benalla wrote: >> src/java.base/share/classes/java/lang/classfile/AnnotationValue.java line >> 681: >> >>> 679: */ >>> 680: static AnnotationValue of(Object value) { >>> 681: requireNonNull(value); >> >> Below is a null test throwing IAE.

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Nizar Benalla
On Fri, 6 Sep 2024 09:14:18 GMT, Adam Sotona wrote: >> Nizar Benalla has updated the pull request incrementally with one additional >> commit since the last revision: >> >> convert TestNullHostile to use JUnit Jupiter API > > src/java.base/share/classes/java/lang/classfile/AnnotationValue.jav

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Adam Sotona
On Thu, 5 Sep 2024 08:49:14 GMT, Nizar Benalla wrote: >> The test is inspired from [FFM API's >> TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), >> I customized their Null checking framework it to work with ClassFile API. >> >> The framework for for

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-05 Thread Nizar Benalla
> The test is inspired from [FFM API's > TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), > I customized their Null checking framework it to work with ClassFile API. > > The framework for for testing an API in bulk, so that all methods are > reflectiv

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v2]

2024-09-04 Thread Nizar Benalla
> The test is inspired from [FFM API's > TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), > I customized their Null checking framework it to work with ClassFile API. > > The framework for for testing an API in bulk, so that all methods are > reflectiv

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-09-04 Thread Nizar Benalla
On Tue, 3 Sep 2024 01:58:59 GMT, Chen Liang wrote: >> The test is inspired from [FFM API's >> TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), >> I customized their Null checking framework it to work with ClassFile API. >> >> The framework for for te

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-09-04 Thread Chen Liang
On Tue, 3 Sep 2024 18:27:48 GMT, ExE Boss wrote: >> The test is inspired from [FFM API's >> TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), >> I customized their Null checking framework it to work with ClassFile API. >> >> The framework for for test

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-09-04 Thread Nizar Benalla
On Mon, 12 Aug 2024 17:23:15 GMT, Nizar Benalla wrote: > The test is inspired from [FFM API's > TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), > I customized their Null checking framework it to work with ClassFile API. > > The framework for for tes

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-09-04 Thread ExE Boss
On Mon, 12 Aug 2024 17:23:15 GMT, Nizar Benalla wrote: > The test is inspired from [FFM API's > TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), > I customized their Null checking framework it to work with ClassFile API. > > The framework for for tes

RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-09-04 Thread Nizar Benalla
The test is inspired from [FFM API's TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), I customized their Null checking framework it to work with ClassFile API. The framework for for testing an API in bulk, so that all methods are reflectively called w

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API

2024-09-04 Thread Chen Liang
On Mon, 12 Aug 2024 17:23:15 GMT, Nizar Benalla wrote: > The test is inspired from [FFM API's > TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), > I customized their Null checking framework it to work with ClassFile API. > > The framework for for tes