[
https://jira.jboss.org/jira/browse/JBMAN-42?page=com.atlassian.jira.plugi...
]
Scott M Stark resolved JBMAN-42.
--------------------------------
Resolution: Done
There is a DefaultMetaValueFactory.mapNullToPrimitive(TypeInfo type) that is called by the
AbstractInstanceClassFactory.setValue when the unwrapped value is null and the property
info is a primitive.
Need to handle setting of null primitive values
-----------------------------------------------
Key: JBMAN-42
URL:
https://jira.jboss.org/jira/browse/JBMAN-42
Project: JBoss Managed
Issue Type: Bug
Components: managedobject, metavalue
Affects Versions: JBossMan.2.0.0.CR5
Reporter: Scott M Stark
Assignee: Scott M Stark
Fix For: JBossMan.2.0.0.GA
Related to JBAS-6188, when a ManagedProperty with a null value that maps to a primitive
field in the underlying attachment is saved, an IllegalArgumentException like the
following is thrown:
Caused by: java.lang.IllegalArgumentException: Wrong arguments. setUseTryLock for target
org.jboss.resource.metadata.mcf
.LocalDataSourceDeploymentMetaData@75687c expected=[long] actual=[null]
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:69)
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at
org.jboss.beans.info.plugins.DefaultPropertyInfo.set(DefaultPropertyInfo.java:143)
at
org.jboss.managed.plugins.factory.AbstractInstanceClassFactory.setValue(AbstractInstanceClassFactory.java:378)
at
org.jboss.managed.plugins.factory.AbstractInstanceClassFactory.setValue(AbstractInstanceClassFactory.java:273)
at
org.jboss.managed.plugins.WritethroughManagedPropertyImpl.setValue(WritethroughManagedPropertyImpl.java:109)
We need to be mapping the null onto the corresponding "0" value for the
primitive and writing that.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira