File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333import java .nio .file .Paths ;
3434import java .util .zip .GZIPInputStream ;
3535
36+ import org .apache .commons .io .FileUtils ;
3637import org .apache .commons .io .IOUtils ;
3738
3839/**
@@ -82,7 +83,7 @@ private static class Stats {
8283
8384 private static final String TEST_RESRC = "org/apache/commons/csv/perf/worldcitiespop.txt.gz" ;
8485
85- private static final File BIG_FILE = new File (System . getProperty ( "java.io.tmpdir" ), "worldcitiespop.txt" );
86+ private static final File BIG_FILE = new File (FileUtils . getTempDirectoryPath ( ), "worldcitiespop.txt" );
8687
8788 private static Reader createReader () throws IOException {
8889 return new InputStreamReader (new FileInputStream (BIG_FILE ), StandardCharsets .ISO_8859_1 );
Original file line number Diff line number Diff line change 3131import org .apache .commons .csv .CSVFormat ;
3232import org .apache .commons .csv .CSVParser ;
3333import org .apache .commons .csv .CSVRecord ;
34+ import org .apache .commons .io .FileUtils ;
3435import org .apache .commons .io .IOUtils ;
3536import org .junit .jupiter .api .BeforeAll ;
3637import org .junit .jupiter .api .Test ;
@@ -45,7 +46,7 @@ public class PerformanceTest {
4546
4647 private static final String TEST_RESRC = "org/apache/commons/csv/perf/worldcitiespop.txt.gz" ;
4748
48- private static final File BIG_FILE = new File (System . getProperty ( "java.io.tmpdir" ), "worldcitiespop.txt" );
49+ private static final File BIG_FILE = new File (FileUtils . getTempDirectoryPath ( ), "worldcitiespop.txt" );
4950 @ BeforeAll
5051 public static void setUpClass () throws FileNotFoundException , IOException {
5152 if (BIG_FILE .exists ()) {
You can’t perform that action at this time.
0 commit comments