RFR: 8261938: ASN1Formatter.annotate should not return in the finally block [v2]
Jie Fu
jiefu at openjdk.java.net
Fri Feb 19 03:38:38 UTC 2021
On Fri, 19 Feb 2021 01:56:19 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> The formattters are a test component used both standalone and in the context of the HexPrinter test utilities.
> In typical use, the stream is a wrapped byte array, so there are no exceptions other than EOF.
> The choice of DataInputStream was chosen for the convenience of the methods to read different types
> and (declared) exceptions are an unwelcome artifact.
>
> Formatters are designed to be nested, where one formatter can call another and the valuable output
> is the formatted string that has been accumulated from the beginning of the stream.
> If an exception was percolated up and the formatted output discarded it would defeat the purpose.
>
> If an exception was thrown, it would still return useful information about the stream to that point.
> The documentation could be improved to be clear on that point.
Got it.
Thanks for your clarification.
Updated.
Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2620
More information about the core-libs-dev
mailing list