[jboss-cvs] JBossAS SVN: r87883 - trunk/system-jmx/src/main/org/jboss/system/deployers/managed.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Apr 27 13:43:13 EDT 2009
Author: emuckenhuber
Date: 2009-04-27 13:43:13 -0400 (Mon, 27 Apr 2009)
New Revision: 87883
Modified:
trunk/system-jmx/src/main/org/jboss/system/deployers/managed/ServiceMetaDataICF.java
Log:
JBAS-6716
Modified: trunk/system-jmx/src/main/org/jboss/system/deployers/managed/ServiceMetaDataICF.java
===================================================================
--- trunk/system-jmx/src/main/org/jboss/system/deployers/managed/ServiceMetaDataICF.java 2009-04-27 17:24:14 UTC (rev 87882)
+++ trunk/system-jmx/src/main/org/jboss/system/deployers/managed/ServiceMetaDataICF.java 2009-04-27 17:43:13 UTC (rev 87883)
@@ -22,6 +22,7 @@
package org.jboss.system.deployers.managed;
import java.io.Serializable;
+import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.List;
@@ -292,8 +293,10 @@
// Look for a MetaMapper
MetaType propertyType = property.getMetaType();
MetaMapper metaMapper = property.getTransientAttachment(MetaMapper.class);
+ Type mappedType = null;
if(metaMapper != null)
{
+ mappedType = metaMapper.mapToType();
plainValue = metaMapper.unwrapMetaValue(value);
}
else
@@ -310,7 +313,7 @@
ServiceAttributeMetaData attr = new ServiceAttributeMetaData();
attr.setName(aname);
md.addAttribute(attr);
- if(plainValue instanceof Element)
+ if(mappedType != null && mappedType.equals(Element.class))
{
attributeValue = new ServiceElementValueMetaData();
}
@@ -331,7 +334,8 @@
}
else if (attributeValue instanceof ServiceElementValueMetaData)
{
- ((ServiceElementValueMetaData) attributeValue).setElement((Element) plainValue);
+ if(plainValue != null)
+ ((ServiceElementValueMetaData) attributeValue).setElement((Element) plainValue);
}
else if (attributeValue instanceof ServiceDependencyValueMetaData)
{
More information about the jboss-cvs-commits
mailing list