
| Key: |
XBEAN-112
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Benjamin Bentmann
|
| Votes: |
0
|
| Watchers: |
0
|
|
Available Workflow Actions
|
|
If you were logged in you would be able to see more operations.
|
|
|
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 property.
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.
|
|
Description
|
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 property.
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. |
Show » |
|