summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentManagerBean.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentManagerBean.java
index e329d46..319319f 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/content/ContentManagerBean.java
@@ -1614,11 +1614,11 @@ public class ContentManagerBean implements ContentManagerLocal, ContentManagerRe
public InstalledPackage getBackingPackageForResource(Subject subject, int resourceId) {
InstalledPackage result = null;
- // check if the resource is content backed
+ // check if the resource is content backed if not, return null
Resource res = resourceManager.getResourceById(subject, resourceId);
ResourceType type = res.getResourceType();
if (!ResourceCreationDataType.CONTENT.equals(type.getCreationDataType())) {
- throw new UnsupportedOperationException("Resource [" + resourceId + "] is not content backed.");
+ return null;
}
InstalledPackageCriteria criteria = new InstalledPackageCriteria();