Turns out I was wrong. We should use a single JAXBContext for all threads since...
authorkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Fri, 24 Aug 2012 00:20:47 +0000 (00:20 +0000)
committerkruland2607 <kruland2607@180e2498-e6e9-4542-8430-84ac67f01cd8>
Fri, 24 Aug 2012 00:20:47 +0000 (00:20 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@994 180e2498-e6e9-4542-8430-84ac67f01cd8

core/src/net/sf/openrocket/preset/xml/OpenRocketComponentSaver.java

index 7117d930cf1b14301582307ca59a2789218468b2..934d4be5e88f5ab41f1aaf7625ff5272a392b893 100644 (file)
@@ -29,9 +29,9 @@ public class OpenRocketComponentSaver {
     /**
      * The JAXBContext.  JAXBContext is thread-safe.
      */
-    private JAXBContext context = null;
+    private static JAXBContext context = null;
 
-    public OpenRocketComponentSaver() {
+    static {
         try {
             context = JAXBContext.newInstance(OpenRocketComponentDTO.class);
         }