> Hi all,
> 
> ASN1Formatter.annotate should be able to throw an IOException according to 
> this comment [1].
> But it fails to do so due to the return [2] in the finally block, which would 
> swallow the IOException.
> 
> Generally, it seems not good to put a return statement in a finally block 
> because it would overwrite other return-statements or Exceptions [3].
> 
> Thanks.
> Best regards,
> Jie
> 
> [1] 
> https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/hexdump/ASN1Formatter.java#L113
> [2] 
> https://github.com/openjdk/jdk/blob/master/test/lib/jdk/test/lib/hexdump/ASN1Formatter.java#L120
> [3] 
> https://stackoverflow.com/questions/17481251/finally-block-does-not-complete-normally-eclipse-warning

Jie Fu has updated the pull request incrementally with one additional commit 
since the last revision:

  Update the copyright year

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2620/files
  - new: https://git.openjdk.java.net/jdk/pull/2620/files/c0af12b1..b537e060

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2620&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2620&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2620.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2620/head:pull/2620

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

Reply via email to