History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XSTR-278
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Assignee: Unassigned
Reporter: Guilherme Silveira
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XStream

field level converter overriding using annotations

Created: 27/Feb/06 12:16 PM   Updated: 07/Aug/06 09:13 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

File Attachments: 1. Text File patch.txt (40 kb)
2. Text File patch.txt (33 kb)


JDK version and platform: 1.5


 Description  « Hide
Allow converter overriding in a field-basis and not class-level... (using annotations).

The patch I have created has the following issues that I did not know what you would like:

1. There is a try/catch during initialization (PureJavaReflectionProvider) that starts the AnnotationProvider.... what to do if an exception is caught? (ClassNotFoundException)
2. JavaAnnotationsReflectionProvider has the same problem with exception dealing (did not know how you would like to do it)

A few acceptance tests were included. I tested it compiling in jdk1.5, running the ant build.
The generated jar file was tested under java 1.5 and 1.4 successfuly.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Guilherme Silveira - 27/Feb/06 12:57 PM
new patch with created files

Mauro Talevi - 02/Mar/06 11:54 AM
Uploaded new patch from Guilherme

Mauro Talevi - 02/Mar/06 12:00 PM
Guilherme - applied your latest patch with some minor modifications (some class and method renames).
Also merged the acceptance tests into a single one. Thanks for great work!



Joerg Schaible - 03/Mar/06 01:38 AM
Hi Guilherme,

thanks for this enhancement. Please have a look, if the current version in the repe works for you, since I applied my changed for the ReflectionConverter refactoring and I had to move around some things. I also dropped the JVM.bestReflectionConverter completely (and that impl made XStream incompatible with a pre JDK 1.5). If anything works for you, please close this issue. All unit tests pass though.

- Jörg