RFR: 8218731: SA: Use concrete class the as return type of VMObjectFactory.newObject
Erik Österlund
erik.osterlund at oracle.com
Thu Feb 14 08:19:58 UTC 2019
Hi Stefan,
This looks good and trivial.
Thanks,
/Erik
On 2019-02-11 08:47, Stefan Karlsson wrote:
> Hi all,
>
> I propose this simple change to use the concrete class as the return
> type of VMObjectFactory.newObject.
>
> https://cr.openjdk.java.net/~stefank/8218731/webrev.01
> https://bugs.openjdk.java.net/browse/JDK-8218731
>
> This allows us to specify the class only once when calling newObject.
> For example, now we can use:
> return VMObjectFactory.newObject(ZPhysicalMemoryManager.class,
> physicalAddr);
>
> Instead of having to write:
> return
> (ZPhysicalMemoryManager)VMObjectFactory.newObject(ZPhysicalMemoryManager.class,
> physicalAddr);
>
> Thanks,
> StefanK
More information about the serviceability-dev
mailing list