Author: struberg
Date: Mon Oct 28 18:01:14 2013
New Revision: 1536455
URL: http://svn.apache.org/r1536455
Log:
OPENJPA-2444 move the cleanup after freeing the InputStream
Win* blocks the whole file as long as the InputStream is not closed.
Thus we can only delete the file afterwards.
Modified:
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestUseSchemaElement.java
Modified:
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestUseSchemaElement.java
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestUseSchemaElement.java?rev=1536455&r1=1536454&r2=1536455&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestUseSchemaElement.java
(original)
+++
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestUseSchemaElement.java
Mon Oct 28 18:01:14 2013
@@ -106,9 +106,6 @@ public class TestUseSchemaElement extend
}
}
- // Delete file to clean up workspace
- assertTrue(uschantbl.delete());
-
} catch (FileNotFoundException e) {
fail("Uschantbl.java not generated in ./target by
ReverseMappingTool");
}
@@ -118,6 +115,9 @@ public class TestUseSchemaElement extend
}
}
+ // Delete file to clean up workspace
+ assertTrue(uschantbl.delete());
+
// This tests the removal of the schema name from the orm.xml file
File orm = new File("target/orm.xml");
try {