[jboss-cvs] JBossAS SVN: r81438 - trunk/profileservice/src/main/org/jboss/profileservice/management.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 21 10:27:49 EST 2008


Author: scott.stark at jboss.org
Date: 2008-11-21 10:27:49 -0500 (Fri, 21 Nov 2008)
New Revision: 81438

Modified:
   trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
Log:
JBAS-6216, ensure non-null collections are returned to ease client usage

Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2008-11-21 15:26:41 UTC (rev 81437)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java	2008-11-21 15:27:49 UTC (rev 81438)
@@ -535,7 +535,10 @@
     */
    public Set<String> getDeploymentNames()
    {
-      return activeProfile.getDeploymentNames();
+      Set<String> names = activeProfile.getDeploymentNames();
+      if(names == null)
+         names = Collections.emptySet();
+      return names;
    }
 
    /**
@@ -601,6 +604,7 @@
       throws NoSuchDeploymentException, Exception
    {
       Set<ManagedDeployment> matches = new HashSet<ManagedDeployment>();
+      // TODO
       return matches;
    }
 
@@ -675,7 +679,10 @@
    public Set<ManagedComponent> getComponentsForType(ComponentType type)
       throws Exception
    {
-      return compByCompType.get(type);
+      Set<ManagedComponent> comps = compByCompType.get(type);
+      if(comps == null)
+         comps = Collections.emptySet();
+      return comps;
    }
    
    public ManagedComponent getComponent(String name, ComponentType type)




More information about the jboss-cvs-commits mailing list