RFR: 8370942: test/jdk/java/security/Provider/NewInstance.java and /test/jdk/java/security/cert/CertStore/NoLDAP.java may skip without notifying [v2]
Mikhail Yankelevich
myankelevich at openjdk.org
Mon Nov 3 16:25:31 UTC 2025
On Mon, 3 Nov 2025 16:17:59 GMT, Neha Joshi <duke at openjdk.org> wrote:
>> test/jdk/java/security/cert/CertStore/NoLDAP.java line 44:
>>
>>> 42: throw new SkippedException("Test skipped :: LDAP is present");
>>> 43: } catch (ClassNotFoundException ignore) {
>>> 44: System.err.println("Class not found exception" + ignore.getMessage());
>>
>> I'd state that this is expected, otherwise it's a bit confusing. What do you think?
>
> We should never silently ignore exceptions so , it better to log it for making it easier to detect and fix problems.
This is expected behaviour, the test shouldn't run without it, so if you add exception logging for expected step it may be confusing. All I propose is to change the log to something like this
Suggestion:
System.err.println("Expected: class not found exception " + ignore.getMessage());
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28112#discussion_r2487090038
More information about the security-dev
mailing list