Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Mark Powers
On Tue, 25 Oct 2022 19:23:09 GMT, Xue-Lei Andrew Fan wrote: >> @mcpowers Did you want to update line line 203-207 as well? It might be >> safe to remove the current getID(byte[]) method. If the parameter is null, >> there is an NPE (unexpected); otherwise, the new method should be safe to >>

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Xue-Lei Andrew Fan
On Tue, 25 Oct 2022 17:56:10 GMT, Xue-Lei Andrew Fan wrote: >> Thanks Tony! > > @mcpowers Did you want to update line line 203-207 as well? It might be safe > to remove the current getID(byte[]) method. If the parameter is null, there > is an NPE (unexpected); otherwise, the new method should

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Xue-Lei Andrew Fan
On Tue, 25 Oct 2022 15:57:56 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8293093 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > add getIDNullSafe Marked as reviewed by xuelei (Reviewer). -

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Mark Powers
On Tue, 25 Oct 2022 17:56:10 GMT, Xue-Lei Andrew Fan wrote: >> Thanks Tony! > > @mcpowers Did you want to update line line 203-207 as well? It might be safe > to remove the current getID(byte[]) method. If the parameter is null, there > is an NPE (unexpected); otherwise, the new method should

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Xue-Lei Andrew Fan
On Tue, 25 Oct 2022 17:49:49 GMT, Mark Powers wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add getIDNullSafe > > Thanks Tony! @mcpowers Did you want to update line line 203-207 as well? It might be safe to rem

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Mark Powers
On Tue, 25 Oct 2022 15:57:56 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8293093 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > add getIDNullSafe Thanks Tony! - PR: https://git.openjdk.org/

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Anthony Scarpino
On Tue, 25 Oct 2022 15:57:56 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8293093 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > add getIDNullSafe looks good - Marked as reviewed by ascarpin

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID [v2]

2022-10-25 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8293093 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: add getIDNullSafe - Changes: - all: https://git.openjdk.org/jdk/pull/10823/files - new: https://git.openjdk.org/jdk/pull/10

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID

2022-10-24 Thread Mark Powers
On Sat, 22 Oct 2022 15:37:38 GMT, Florent Guillaume wrote: >> https://bugs.openjdk.org/browse/JDK-8293093 > > Given the repeated code wouldn't you want to create a small helper method > like `getIDNullSafe`? @efge Good suggestion. And having `NullSafe` in the name answers an important question

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID

2022-10-24 Thread Sean Mullan
On Fri, 21 Oct 2022 19:54:57 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8293093 You should add a `noreg` label (ex: `noreg-trivial` or `noreg-other`) to the bug if you don't plan on writing a regression test. - PR: https://git.openjdk.org/jdk/pull/10823

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID

2022-10-24 Thread Anthony Scarpino
On Fri, 21 Oct 2022 19:54:57 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8293093 Looking at the usage of getID(), it seems like debug msgs and exceptions are where the null maybe a problem. mapLabel() checks for null. It maybe best to change getID(bytes[]) to return new Str

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID

2022-10-22 Thread Xue-Lei Andrew Fan
On Fri, 21 Oct 2022 19:54:57 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8293093 There are some other places, for example in updatePkey(), that use cka_id. Did you have a chance to check if NPE is possible there as well? - PR: https://git.openjdk.org/jdk/pull/10

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID

2022-10-22 Thread Florent Guillaume
On Fri, 21 Oct 2022 19:54:57 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8293093 Given the repeated code wouldn't you want to create a small helper method like `getIDNullSafe`? - PR: https://git.openjdk.org/jdk/pull/10823

RFR: JDK-8293093 NPE in P11KeyStore.getID

2022-10-21 Thread Mark Powers
https://bugs.openjdk.org/browse/JDK-8293093 - Commit messages: - Merge - second iteration - first iteration Changes: https://git.openjdk.org/jdk/pull/10823/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10823&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8293093

Re: RFR: JDK-8293093 NPE in P11KeyStore.getID

2022-10-21 Thread Mark Powers
On Fri, 21 Oct 2022 19:54:57 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8293093 I was finally able to reproduce this failure and was able to verify the fix. Took forever. - PR: https://git.openjdk.org/jdk/pull/10823