On Wed, 27 Apr 2022 15:57:34 GMT, Mandy Chung <mch...@openjdk.org> wrote:

>> Kim Barrett has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   update copyright, @bug list
>
> test/jdk/java/lang/ref/ReferenceClone.java line 52:
> 
>> 50:         } catch (CloneNotSupportedException e) {
>> 51:             throw new RuntimeException("CloneableReference::clone should 
>> not throw CloneNotSupportedException");
>> 52:         }
> 
> Alternatively, it could simply let CNSE propagate.
> 
> 
> CloneableReference ref = new CloneableReference(o);
> ref.clone();
> 
> 
> `test()` and `main` will need to declare this checked exception.

That was my initial thought, but it doesn't work - CNSE is a checked exception 
so must be handled.

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

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

Reply via email to