Skip to content

Commit

Permalink
8285690: CloneableReference subtest should not throw CloneNotSupporte…
Browse files Browse the repository at this point in the history
…dException

Backport-of: 2d8d1402147f6ddd15732ce7098a8438317a2681
  • Loading branch information
GoeLin committed Jan 25, 2023
1 parent f4c5bdf commit d1fb7b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/jdk/java/lang/ref/ReferenceClone.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -23,7 +23,7 @@

/*
* @test
* @bug 8201793
* @bug 8201793 8285690
* @summary Test Reference::clone to throw CloneNotSupportedException
*/

Expand All @@ -47,7 +47,9 @@ public void test() {
CloneableReference ref = new CloneableReference(o);
try {
ref.clone();
} catch (CloneNotSupportedException e) {}
} catch (CloneNotSupportedException e) {
throw new RuntimeException("CloneableReference::clone should not throw CloneNotSupportedException");
}
}

private void assertCloneNotSupported(CloneableRef ref) {
Expand Down

1 comment on commit d1fb7b2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.