RFR: 8265261: java/nio/file/Files/InterruptCopy.java fails with java.lang.RuntimeException: Copy was not interrupted [v2]
Daniel Fuchs
dfuchs at openjdk.java.net
Thu Aug 19 11:07:22 UTC 2021
On Thu, 19 Aug 2021 01:06:47 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> This proposal suggests to change the timing of testing whether a file copy is terminated by an interrupt.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8265261: Fix the section which tests cancellation
Updated logic LGTM.
test/jdk/java/nio/file/Files/InterruptCopy.java line 144:
> 142: else {
> 143: result.get();
> 144: throw new RuntimeException("Copy was not cancelled");
Should `DURATION_MAX_IN_MS` be taken into account here too to decide whether to throw or not?
-------------
Marked as reviewed by dfuchs (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5154
More information about the nio-dev
mailing list