RFR: 8065213 Specify and implement PlatformMBeanProvider for looking for all platform MBeans

Daniel Fuchs daniel.fuchs at oracle.com
Thu Jan 29 11:07:26 UTC 2015


On 28/01/15 07:46, Mandy Chung wrote:
> com/sun/management/internal/PlatformMBeanProviderImpl.java
>     line 43: does this mxbeanList have to be created lazily?
>     Would it be better to make it a final field and create it at the
> constructor?

Hi Mandy,

I was the one to suggest the lazy initialization.
Given that the constructor is going to be invoked by the
ServiceLoader, I thought it would be better to delay any
heavy initialization until such time that the loaded
service provider is actually used.

best regards,

-- daniel


More information about the serviceability-dev mailing list