public Set listGBeans(ObjectName pattern) {
- return gbeanRegistry.listGBeans(pattern);
+ String domain = (pattern == null || pattern.isDomainPattern()) ? null : pattern.getDomain();
+ Map props = pattern == null ? null : pattern.getKeyPropertyList();
+ Set gbeans = gbeanRegistry.listGBeans(domain, props);
+ Set result = new HashSet(gbeans.size());
+ for (Iterator i = gbeans.iterator(); i.hasNext();) {
+ GBeanInstance instance = (GBeanInstance) i.next();
+ result.add(instance.getObjectNameObject());
+ }
+ return result;
}
On just a cursory review of this commit, it appears that you have changed the way object name queries work. Before making any other changes to this code, can you please explain the changes you want to make, so we can discuss the impact? I am very nervous about any changes to this code.
-dain
