Description of problem: Have a resource that can discover some content but is not in itself a content-backed resource (for example a JBoss AS 4 server, that can discover the jar files in its lib). In CLI, call: var id = <ID OF THE AS4 RESOURCE> var content = ContentManager.getBackingContentForResource(id) Version-Release number of selected component (if applicable): 4.6.0-SNAPSHOT (but the code has been incorrect since forever, with the last change to the behavior on 5th Jan 2012) How reproducible: always Steps to Reproduce: 1. Wait for the content of the AS4 resource to be discovered (takes a while after it is imported to the inventory) 2. In CLI, call: var id = <ID OF THE AS4 RESOURCE> var content = ContentManager.getBackingContentForResource(id) Actual results: The content variable is non-null and contains an instance of "InstalledPackage" object pointing to one of the "jars" discovered inside the AS4 server. Expected results: The method should probably throw an exception complaining that AS4 server is not a content backed resource. Additional info:
master http://bugzilla.redhat.com/show_bug.cgi?id=77d64e830 time: Wed Feb 6 14:53:28 2013 +0100 commit: 77d64e8302bfe3b1df0c5e209ab7a203b10dd589 author: Jirka Kremser - jkremser message: [BZ 902823 - Nonsense data returned as backing content of non-content-backed resources] The UnsupportedOperationException is thrown when the resource is non-content-backed. I was checking also the usages of the method and it seems to be ok.
the link ^^ should be http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=77d64e830
master http://git.fedorahosted.org/cgit/rhq/rhq.git/diff/?id=c7199465b time: Tue Feb 12 17:06:56 2013 +0100 commit: c7199465b2ab8bf9cd253fdffcc278577d557a7a author: Jirka Kremser - jkremser message: [BZ 902823 - Nonsense data returned as backing content of non-content-backed resources] Instead of throwing the exception, the null is returned. Now it's in compliance w/ the the method's jdoc.
Bulk closing of issues in old RHQ releases that are in production for a while now. Please open a new issue when running into an issue.