Skip to content

Commit 6a74658

Browse files
author
bentmann
committed
o Avoided usage of StringInputStream
1 parent a267cc8 commit 6a74658

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/codehaus/plexus/util/FileUtilsTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* SOFTWARE.
2525
*/
2626

27+
import java.io.ByteArrayInputStream;
2728
import java.io.File;
2829
import java.io.FileInputStream;
2930
import java.io.FileOutputStream;
@@ -874,6 +875,7 @@ public void testCopyDirectoryStructureToSelf()
874875
}
875876
catch ( IOException e )
876877
{
878+
// expected
877879
}
878880
}
879881

@@ -1135,7 +1137,7 @@ public void testDeleteLongPathOnWindows()
11351137

11361138
File f = new File( a1, path.toString() + "test.txt" );
11371139

1138-
InputStream is = new StringInputStream( "Blabla" );
1140+
InputStream is = new ByteArrayInputStream( "Blabla".getBytes( "UTF-8" ) );
11391141
OutputStream os = new FileOutputStream( f.getCanonicalFile() );
11401142
IOUtil.copy( is, os );
11411143
IOUtil.close( is );

0 commit comments

Comments
 (0)