XStream- Object to Xml
Closing Review comments, test cases added.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.baeldung.initializer;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
|
||||
public class SimpleXstreamInitializer {
|
||||
|
||||
private static XStream xstreamInstance;
|
||||
|
||||
public static XStream getXstreamInstance() {
|
||||
if (xstreamInstance == null) {
|
||||
synchronized (SimpleXstreamInitializer.class) {
|
||||
if (xstreamInstance == null) {
|
||||
xstreamInstance = new XStream();
|
||||
}
|
||||
}
|
||||
}
|
||||
return xstreamInstance;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user