Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-RC-1
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
Description
XStream (http://xstream.codehaus.org/) provides a neat serialisation format in XML. It would be nice to serialise the state of a PicoContainer with XStream, and this would complement the default serialisation as well as the mechanism provided by org.nanocontainer.reflection.recorder.ContainerRecorder. (3 different serialisation schemes, each of which have their strengths and weaknesses).
Here is a testcase that should pass with XStream compatibility in place:
public void testShouldBeAbleToSerializeContainerWithXStream()
{ MutablePicoContainer pico = new DefaultPicoContainer(); pico.registerComponentImplementation(ArrayList.class); XStream xStream = new XStream(); String picoXML = xStream.toXML(pico); MutablePicoContainer pico2 = (MutablePicoContainer) xStream.fromXML(picoXML); assertNotNull(pico2.getComponentInstance(ArrayList.class)); }Issue Links
- depends upon
-
XSTR-45
Converters for java.lang.reflect.Method and Constructor
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Aslak Hellesoy [ rinkrank ] | Konstantin Pribluda [ ko5tik ] |
| Assignee | Konstantin Pribluda [ ko5tik ] | Aslak Hellesoy [ rinkrank ] |
| Affects Version/s | 1.0.1 [ 10307 ] | |
| Fix Version/s | 1.0.1 [ 10307 ] |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 1.0-RC-1 [ 10461 ] | |
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 1.0.1 [ 10307 ] |
Resolving this issue will require most of the current final fields in various classes to be made non final.
This is a bit of a hack, but has no impact on the bytecode (final info is not in the bytecode afaik).
Any objections about making fields non final can be discussed here.