From: <gv...@hy...> - 2008-09-08 22:30:24
|
Author: gviedma Date: 2008-09-08 15:30:20 -0700 (Mon, 08 Sep 2008) New Revision: 11039 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=11039 Modified: trunk/src/org/hyperic/hq/product/jmx/MxUtil.java Log: HHQ-2365 HQ cannot retrieve MBean attributes when the ObjectName contains encoded characters (reviewed by Doug) Modified: trunk/src/org/hyperic/hq/product/jmx/MxUtil.java =================================================================== --- trunk/src/org/hyperic/hq/product/jmx/MxUtil.java 2008-09-08 20:53:53 UTC (rev 11038) +++ trunk/src/org/hyperic/hq/product/jmx/MxUtil.java 2008-09-08 22:30:20 UTC (rev 11039) @@ -300,7 +300,7 @@ MetricUnreachableException, PluginException { - String objectName = metric.getObjectName(); + String objectName = Metric.decode(metric.getObjectName()); String attribute = metric.getAttributeName(); Properties config = metric.getProperties(); @@ -309,7 +309,7 @@ } catch (MalformedURLException e) { throw invalidURL(metric.getProperties(), e); } catch (MalformedObjectNameException e) { - throw invalidObjectName(metric.getObjectName(), e); + throw invalidObjectName(objectName, e); } catch (IOException e) { removeMBeanConnector(config); if (metric.isAvail()) { @@ -325,10 +325,10 @@ if (metric.isAvail()) { return new Double(Metric.AVAIL_UP); } - throw attributeNotFound(metric.getObjectName(), + throw attributeNotFound(objectName, metric.getAttributeName(), e); } catch (InstanceNotFoundException e) { - throw objectNotFound(metric.getObjectName(), e); + throw objectNotFound(objectName, e); } catch (ReflectionException e) { throw error(metric.toString(), e); |