On Thu, 2 Mar 2023 23:32:47 GMT, Alex Menkov <amen...@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

Reply via email to