harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Li Jing Qin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6355) Unable to set persistenceDelegate for a class via BeanInfo
Date Mon, 19 Oct 2009 10:31:31 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-6355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12767276#action_12767276

Li Jing Qin commented on HARMONY-6355:

The problem seems to be every time we want a bean descriptor,harmony build a new one to return
(we can find the problem in the testcase which is in the patch)

> Unable to set persistenceDelegate for a class via BeanInfo
> ----------------------------------------------------------
>                 Key: HARMONY-6355
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6355
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M11
>            Reporter: Jingkei Ly
>         Attachments: HARMONY-6355.diff
> As mentioned in HARMONY-6354, XMLEncoder is unable to encode an enum. One workaround
(described in the comments of this bug report for the RI: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5015403)
is to create a custom persistence delegate and set the persistenceDelegate for the enum via
the BeanInfo's bean descriptor, i.e.:
> BeanInfo info = Introspector.getBeanInfo(MyEnum.class);
> info.getBeanDescriptor().setValue("persistenceDelegate", new MyCustonPersistenceDelegate());
> When you use XMLEncoder.encode(), it should use the persistenceDelegate specified in
the BeanDescriptor - this works in the RI, but not in Harmony.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message