RFR: 8303489: Add a test to verify classes in vmStruct have unique vtables [v2]
Chris Plummer
cjplummer at openjdk.org
Fri Mar 3 00:47:04 UTC 2023
On Thu, 2 Mar 2023 23:32:47 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> test/hotspot/jtreg/serviceability/sa/UniqueVtableTest.java line 85:
>>
>>> 83: int dupsFound = 0;
>>> 84: // agent.getTypeDataBase() returns HotSpotTypeDataBase (extends BasicTypeDataBase)
>>> 85: BasicTypeDataBase typeDB = (BasicTypeDataBase)(agent.getTypeDataBase());
>>
>> I don't think the cast is needed.
>
> agent.getTypeDataBase() returns TypeDataBase, we need BasicTypeDataBase
Your comment seems to indicate otherwise, although I think what you meant is that the declared return type for agent.getTypeDataBase() is TypeDataBase, but it actually returns an object of type HotSpotTypeDataBase, which is a subclass of BasicTypeDataBase. You should make that more clear.
-------------
PR: https://git.openjdk.org/jdk/pull/12820
More information about the serviceability-dev
mailing list