geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <>
Subject [jira] Updated: (XBEAN-112) Allow conversion from File, URL, Number etc. to String
Date Tue, 14 Oct 2008 11:17:44 GMT


Benjamin Bentmann updated XBEAN-112:

    Attachment: XBEAN-112.patch

Proposed patch.

> Allow conversion from File, URL, Number etc. to String
> ------------------------------------------------------
>                 Key: XBEAN-112
>                 URL:
>             Project: XBean
>          Issue Type: Improvement
>          Components: reflect
>    Affects Versions: 3.4.2
>            Reporter: Benjamin Bentmann
>         Attachments: XBEAN-112.patch
> Values of type {{File}}, {{URL}}, {{Integer}} etc. can naturally be converted to strings.
However, the {{ObjectRecipe}} currently blows up if one passes such objects into a string-typed
> Some background on the motivation: The property values are not be provided via an XML
configuration, i.e. are not natively represented as strings, but are instead retrieved from
some expression evaluator that (reflectively) queries a property value from some other bean.
If those expressions deliver a non-string-typed value, they can't be injected into a string-typed
field. This is pity given that a mere invocation of {{toString()}} does the trick and for
instance allows to pass a filesystem path into a String field regardless whether the path
happens to be represented by a {{String}} or a {{File}} object.

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

View raw message