RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v2]

Weijun Wang weijun at openjdk.org
Thu Jul 7 14:05:46 UTC 2022


On Wed, 29 Jun 2022 16:13:15 GMT, Jayashree Huttanagoudar <duke at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/x509/X509CertImpl.java line 742:
>> 
>>> 740: 
>>> 741:         if (id.equalsIgnoreCase(INFO)) {
>>> 742:             if ((attr.getSuffix() == null)) {
>> 
>> You can remove the parentheses that were added last time.
>
> @wangweij I have added the test case under: test/jdk/sun/security/x509/X509CertImpl/JDK8283082.java 
> As this is the first I am adding regression test so I am not sure whether the naming convention for the test case is right or not.

Thanks for adding the test. It looks fine.

Please add a copyright header and a block of `@test` comment to the test. You can find a nearby existing test file and see what they looks like. Since it references internal classes, a `@modules java.base/sun.security.x509` is necessary. Please run the test with the `jtreg` command to ensure everything is correct. Before your fix, the test should fail; and after it, it should succeed.

-------------

PR: https://git.openjdk.org/jdk/pull/9306



More information about the security-dev mailing list