RFR: 8261938: ASN1Formatter.annotate should not return in the finally block [v2]

Jie Fu jiefu at openjdk.java.net
Thu Feb 18 23:43:39 UTC 2021


On Thu, 18 Feb 2021 14:53:17 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Jie Fu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update the copyright year
>
> An EOFException can occur during the call to annotate() and must return the accumulated contents of the StringBuffer.  Otherwise it is discarded.

Thanks @RogerRiggs  for your review.

Just want to make sure:

  1. AFAIK, for a method, it seems impossible to return a value and throw an exception at the same time.
     Did you mean we just need to return a string with the IOException to be catched?

  2. Does it make sense to return a string when an IOException happens?

Thanks.

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

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


More information about the core-libs-dev mailing list