commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1568696 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
Date Sat, 15 Feb 2014 22:10:31 GMT
Author: sebb
Date: Sat Feb 15 22:10:31 2014
New Revision: 1568696

URL: http://svn.apache.org/r1568696
Log:
Don't create path names by appending strings

Modified:
    commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java

Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java?rev=1568696&r1=1568695&r2=1568696&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
(original)
+++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/DiskFileItemSerializeTest.java
Sat Feb 15 22:10:31 2014
@@ -146,7 +146,7 @@ public class DiskFileItemSerializeTest {
     public void testInvalidRepository() throws Exception {
         // Create the FileItem
         byte[] testFieldValueBytes = createContentBytes(threshold);
-        File repository = new File(System.getProperty("java.io.tmpdir") + "file");
+        File repository = new File(System.getProperty("java.io.tmpdir"), "file");
         FileItem item = createFileItem(testFieldValueBytes, repository);
         deserialize(serialize(item));
     }
@@ -158,7 +158,7 @@ public class DiskFileItemSerializeTest {
     public void testInvalidRepositoryWithNullChar() throws Exception {
         // Create the FileItem
         byte[] testFieldValueBytes = createContentBytes(threshold);
-        File repository = new File(System.getProperty("java.io.tmpdir") + "\0");
+        File repository = new File(System.getProperty("java.io.tmpdir"), "\0");
         FileItem item = createFileItem(testFieldValueBytes, repository);
         deserialize(serialize(item));
     }



Mime
View raw message