Should the fix to BZ 794489 be considered a change to plugin API?

Ian Springer ian.springer at redhat.com
Tue Feb 21 16:19:10 UTC 2012


+1.

For clarity, you could add notes to the class and constructor Javadocs 
stating that the class is not intended to be instantiated by plugins.

On 02/21/2012 11:15 AM, Lukas Krejci wrote:
> Hi all,
>
> in fix for https://bugzilla.redhat.com/show_bug.cgi?id=794489 I needed to change the ResourceContext class, which is part of our plugin API. The API changes were following:
>
> 1) add (yet another) parameter to the constructor of the class
> 2) add a protected method (this is not necessarily required but good from the code reuse POV).
>
> (the diff is here: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blobdiff;f=modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/inventory/ResourceContext.java;h=a5d3d75f1977281e25fef6d8f98f6337d01eebf2;hp=853345d0db30dbd14c21a5a42a39b488fe0c3cd5;hb=21ce96ac0da01f32f3c57acec608523176db2ceb;hpb=e2bbfdf06987dd1de0dcedac98f69116f21a24ae)
>
> I don't think this should be considered a change in our public plugin API, because ResourceContext is not meant to be constructed by plugin code (an instance of ResourceContext is merely provided to a resource component during the ResourceComponent.start() method). The protected method is a) not publicly accessible and b) doesn't clash with any pre-existing method on that class.
>
> Even though I'm reasonably confident about that opinion, I'd like to get an agreement on it from other team members.
>
> Thanks,
>
> Lukas
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel


-- 
Ian Springer
Principal Software Developer
JBoss Operations Network
Red Hat
ian.springer at redhat.com



More information about the rhq-devel mailing list