RFR: 8218731: SA: Use concrete class the as return type of VMObjectFactory.newObject

Stefan Karlsson stefan.karlsson at oracle.com
Thu Feb 14 09:10:25 UTC 2019


Thanks, Erik.

Stefank

On 2019-02-14 09:19, Erik Österlund wrote:
> 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