Menu

#4173 [HHQ-4024] GenericPlugin.getProductPlugin() returning NULL d

Bug
open
None
1
2012-10-09
2010-06-10
No

http://jira.hyperic.com/browse/HHQ-4024
I'm calling getProductPlugin() from my autodiscovery method


protected Set<ServiceType> discoverServiceTypes(ConfigResponse serverConfig)



This method is returning NULL which is not good. Not sure if it's returning NULL every time and every situation.



Comparing what we have in HQ4.2 it works differently and actually works. Maybe some fixes from last autumm is not incorporated in evolution code?





From evolution:


    public ProductPlugin getProductPlugin() {


        if (this instanceof ProductPlugin) {


            return (ProductPlugin)this;


        }


        if (this.productPlugin == null) {


            this.productPlugin = getProductPlugin(getName());


        }


        return this.productPlugin;


    }




From HQ4.2


Rev 13786 [HHQ-3433] getProductPlugin using getTypeInfo().getName()



    public ProductPlugin getProductPlugin() {


        if (this instanceof ProductPlugin) {


            return (ProductPlugin)this;


        }


        if (this.productPlugin == null) {


            this.productPlugin = getProductPlugin(getName());


        }


        //XXX seems this is the correct name to use and the above should be removed?


        if ((this.productPlugin == null) && (getTypeInfo() != null)) {


            this.productPlugin = getProductPlugin(getTypeInfo().getName());


        }


        return this.productPlugin;


    }

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.