RFR: 8305082: Suppress the warning for finalize() from test/hotspot/jtreg/runtime/linkResolver/InterfaceObjectTest.java [v2]
Coleen Phillimore
coleenp at openjdk.org
Mon May 8 17:47:29 UTC 2023
On Mon, 8 May 2023 08:10:15 GMT, Afshin Zafari <duke at openjdk.org> wrote:
>> The warning is suppressed. The `finalize()` method is used intentionally as a method inherited from `Object`.
>
> Afshin Zafari has updated the pull request incrementally with two additional commits since the last revision:
>
> - 8305082: Remove finalize() from test/hotspot/jtreg/runtime/linkResolver/InterfaceObjectTest.java
> - 8305082: Remove finalize() from test/hotspot/jtreg/runtime/linkResolver/InterfaceObjectTest.java
I have some questions about this test.
test/hotspot/jtreg/runtime/linkResolver/InterfaceObjectTest.java line 60:
> 58: } catch (Throwable t) {
> 59: throw new AssertionError(t);
> 60: }
I don't think you need toString() since it's public and will be found through the I interface class. I don't know what the purpose of tryIt is. If you change the call in tryIt to clone, I think that will show that you can find clone() only if it's overridden in the class.
test/hotspot/jtreg/runtime/linkResolver/InterfaceObjectTest.java line 70:
> 68:
> 69:
> 70: // Test with reflection without abstract public clone() and finalize() methods.
Remove "and finalize()".
-------------
Changes requested by coleenp (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13778#pullrequestreview-1417222584
PR Review Comment: https://git.openjdk.org/jdk/pull/13778#discussion_r1187714288
PR Review Comment: https://git.openjdk.org/jdk/pull/13778#discussion_r1187709594
More information about the hotspot-runtime-dev
mailing list