Author: krosenvold Date: Tue Apr 13 09:38:39 2010 New Revision: 933530 URL: http://svn.apache.org/viewvc?rev=933530&view=rev Log: o Changed to thread-safe static initialization of XStream
Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructureSerializer.java Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructureSerializer.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructureSerializer.java?rev=933530&r1=933529&r2=933530&view=diff ============================================================================== --- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructureSerializer.java (original) +++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/util/WebappStructureSerializer.java Tue Apr 13 09:38:39 2010 @@ -40,19 +40,23 @@ import java.io.Writer; public class WebappStructureSerializer { - private final XStream xStream; + private static final XStream xStream; - /** - * Creates a new instance of the serializer. - */ - public WebappStructureSerializer() - { - this.xStream = new XStream(new DomDriver()); + static { + xStream = new XStream(new DomDriver()); // Register aliases xStream.alias( "webapp-structure", WebappStructure.class ); xStream.alias( "path-set", PathSet.class ); xStream.alias( "dependency", Dependency.class ); + + } + + /** + * Creates a new instance of the serializer. + */ + public WebappStructureSerializer() + { }