You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ra...@apache.org on 2006/12/13 22:58:13 UTC

svn commit: r486851 - /jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java

Author: rahul
Date: Wed Dec 13 13:58:12 2006
New Revision: 486851

URL: http://svn.apache.org/viewvc?view=rev&rev=486851
Log:
Warn, but do not fail tests, if the DOM L2 implementation is not serializable.

Modified:
    jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java

Modified: jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java?view=diff&rev=486851&r1=486850&r2=486851
==============================================================================
--- jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java (original)
+++ jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java Wed Dec 13 13:58:12 2006
@@ -20,6 +20,7 @@
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.NotSerializableException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.net.URL;
@@ -242,6 +243,11 @@
                 new ObjectInputStream(new FileInputStream(filename));
             roundtrip = (SCXML) in.readObject();
             in.close();
+        } catch (NotSerializableException nse) {
+            // <data> nodes failed serialization
+            System.err.println("SERIALIZATION ERROR: The DOM implementation"
+                + " in use is not serializable");
+            return scxml;
         } catch(IOException ex) {
             ex.printStackTrace();
         } catch(ClassNotFoundException ex) {
@@ -267,6 +273,12 @@
                 new ObjectInputStream(new FileInputStream(filename));
             roundtrip = (SCXMLExecutor) in.readObject();
             in.close();
+        } catch (NotSerializableException nse) {
+            // <data> nodes failed serialization, test cases do not add
+            // other non-serializable context data
+            System.err.println("SERIALIZATION ERROR: The DOM implementation"
+                + " in use is not serializable");
+            return exec;
         } catch(IOException ex) {
             ex.printStackTrace();
         } catch(ClassNotFoundException ex) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org