[ http://jira.magnolia.info/browse/MAGNOLIA-1304?page=comments#action_13191
]
Grégory Joseph commented on MAGNOLIA-1304:
------------------------------------------
John,
I had specific problems with JcrBeanCoder, around line 204:
protected int currentType ()
// ...
final String className = currentClassName();
if (className == null)
//... throws exception
if (className.equals("Null"))
The currentClassName() method would return null - which is probably what's
expected - but then the 1st if would go against that and throw an exception
stating the class property is missing - while if we used the Propertype.STRING
type, we jump into the 2nd if block.
I can't find any clear/concise/explicit reference as to what PropertyType.NAME
is supposed to reflect - can you point me to one ?
> Proper handling of PropertyType.NAME in MgnlNode.setProperty
> ------------------------------------------------------------
>
> Key: MAGNOLIA-1304
> URL: http://jira.magnolia.info/browse/MAGNOLIA-1304
> Project: Magnolia
> Issue Type: Task
> Components: core, workflow
> Affects Versions: 3.0.2
> Reporter: Grégory Joseph
> Assigned To: Sameer Charles
> Fix For: 3.0.2
>
>
> For some unknown reason, the JcrBeanCoder uses PropertyType.NAME when storing
> Null values - I've only seen this happening with the
> "openwfe.org.jcr.beancoder.JcrBeanCoder__instance_class" property. As a
> result, the related beans can't be deserialized.
> I've applied to following fix for now, but it's far from elegant:
> if (type == PropertyType.NAME) {
> log.warn("setProperty(" + propertyName + ", " + valueStr + " with
> type PropertyType.NAME, will switch to PropertyType.STRING ...");
> type = PropertyType.STRING;
> }
> We should:
> 1) understand why/how PropertyType.NAME was used in the first place
> 2) if PropertyType.NAME is a valid choice, make it so that the bean can be
> deserialized anyhow. if not, then fix JcrBeanCoder.
> This was working before MAGNOLIA-1303 because the type parameter was ignored
> and all properties stored as Strings.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------