RFR: 8249783: Simplify DerValue and DerInputStream [v2]

Valerie Peng valeriep at openjdk.java.net
Tue Sep 29 02:51:15 UTC 2020


On Fri, 25 Sep 2020 23:57:35 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/util/DerValue.java line 170:
>> 
>>> 168:
>>> 169:     // Unsafe. Legacy. Never null.
>>> 170:     final public DerInputStream data;
>> 
>> nit: public final for sake of consistency? If not meant to be used anymore, mark it clearly across all relevant methods
>> with deprecated javadoc tag?
>
> public for compatibility, and final because it won't need to change. I'll see how many `@deprecated` I can add. Or,
> I'll see if I can move all will-be-deprecated code together.

Yeah, it'd be nice if all will-be-deprecated code are together. Easier to spot and less chance for them to be picked up
and used.

>> src/java.base/share/classes/sun/security/util/DerValue.java line 294:
>> 
>>> 292:
>>> 293:     /**
>>> 294:      * Parse an ASN.1/BER encoded datum from a byte array.
>> 
>> DER instead of BER?
>
> There is allowBER, so BER.

Well, allowBER may be false? How about ASN.1/DER/BER?

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

PR: https://git.openjdk.java.net/jdk/pull/232



More information about the security-dev mailing list