--- a/classes/hirondelle/web4j/model/TESTMessageSerialization.java Fri Dec 06 10:38:18 2013 +0100
+++ b/classes/hirondelle/web4j/model/TESTMessageSerialization.java Fri Dec 06 10:38:45 2013 +0100
@@ -2,6 +2,7 @@
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
+import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -57,7 +58,8 @@
// PRIVATE
private <T> void testSerializable(T aThing) throws FileNotFoundException, IOException, ClassNotFoundException {
- OutputStream file = new FileOutputStream( "C:\\Temp\\test.ser" );
+ File tmp = File.createTempFile("web4j", ".ser");
+ OutputStream file = new FileOutputStream(tmp);
OutputStream buffer = new BufferedOutputStream( file );
ObjectOutput output = new ObjectOutputStream( buffer );
try{
@@ -67,7 +69,7 @@
output.close();
}
- InputStream inFile = new FileInputStream( "C:\\Temp\\test.ser" );
+ InputStream inFile = new FileInputStream(tmp);
InputStream inBuffer = new BufferedInputStream( inFile );
ObjectInput input = new ObjectInputStream ( inBuffer );
try{