On Thu, 8 Apr 2021 17:18:50 GMT, Jamil Nimeh <jni...@openjdk.org> wrote:

>> I don't want to go on reading the following bytes to find out what the 
>> intended tag number is, because that somehow shows I do understand the 
>> encoding _a lot_ but still don't want to support it (well, actually I only 
>> understand _a little_). There are only 2 kinds of tags: one <= 30 and one >= 
>> 31. IMHO, the message has already expressed the meaning that we only support 
>> the 1st one.
>> 
>> An alternative message I can think of is "Unsupported tag byte: 0xBF", but 
>> it looks too cryptic.
>
> I think that is fair.  If you don't want to read ahead like that, what about 
> using the "offset" or "pos" field to give a message like "Tag number over 30 
> at offset NN is not supported" (something like that, at least)  Maybe don't 
> worry about the tag value itself, but at least the position in the data 
> stream.  Just a suggestion only, no strong feelings about this either way.

There _is_ an `offset` value here but I have really no idea if the user knows 
where to count from. If we say "offset" then we probably need to tell what data 
block we are talking about. What if the DerValue is just a portion of a bigger 
data block?

That said, if you really like it, I can add an offset like "tag byte at offset 
nnnn". I just hope the user can find it.

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

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

Reply via email to