On Thu, 22 Jun 2023 23:22:14 GMT, Ben Perez <d...@openjdk.org> wrote:
>> Added single-argument `putTime` method to `DerOutputStream` that selects the >> correct encoding based on the `Date` value. Similarly, a `getTime` method >> was added to `DerValue` to automatically call the correct decoding function >> based on the date type specified by the `tag`. Furthermore, the `encode` >> method in `PKCS9Attribute` was changed to utilize the new `putTime` method. > > Ben Perez has updated the pull request incrementally with two additional > commits since the last revision: > > - Fixed epoch literals to be in milliseconds > - Updated copyright in DerInputStream src/java.base/share/classes/sun/security/util/DerOutputStream.java line 490: > 488: public DerOutputStream putTime(Date d) { > 489: Date low = new Date(-631152000000L); // Dates before 1/1/1950 > 490: Date high = new Date(2524607999000L); // Dates after 12/31/2049 Could these be `private static final` since they are constants? It would avoid the extra constructor calls each time this method is called. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14617#discussion_r1239478167