commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r731758 - /commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
Date Mon, 05 Jan 2009 22:58:59 GMT
Author: sebb
Date: Mon Jan  5 14:58:59 2009
New Revision: 731758

URL: http://svn.apache.org/viewvc?rev=731758&view=rev
Log:
If directory creation fails, let the subsequent file creation fail

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

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java?rev=731758&r1=731757&r2=731758&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
(original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/SCXMLTestHelper.java
Mon Jan  5 14:58:59 2009
@@ -280,9 +280,8 @@
 
     public static SCXML testModelSerializability(final SCXML scxml) throws Exception {
         File fileDir = new File(SERIALIZATION_DIR);
-        if (!fileDir.exists() && !fileDir.mkdirs()) {
-            System.err.println("SKIPPED SERIALIZATION: Failed directory creation");
-            return scxml;
+        if (!fileDir.exists()) {
+            fileDir.mkdirs();
         }
         String filename = SERIALIZATION_FILE_PREFIX
             + getSequenceNumber() + SERIALIZATION_FILE_SUFFIX;
@@ -315,9 +314,8 @@
 
     public static SCXMLExecutor testExecutorSerializability(final SCXMLExecutor exec) throws
Exception {
         File fileDir = new File(SERIALIZATION_DIR);
-        if (!fileDir.exists() && !fileDir.mkdirs()) {
-            System.err.println("SKIPPED SERIALIZATION: Failed directory creation");
-            return exec;
+        if (!fileDir.exists()) {
+            fileDir.mkdirs();
         }
         String filename = SERIALIZATION_FILE_PREFIX
             + getSequenceNumber() + SERIALIZATION_FILE_SUFFIX;



Mime
View raw message