Minor Improvement: (#130)

* System.arraycopy
* Remove redundant initializer
* Use empty array
This commit is contained in:
Arturo Bernal 2021-07-03 20:39:49 +02:00 committed by GitHub
parent af84037189
commit 3f6357e8f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -184,7 +184,7 @@ public class CSVBenchmark {
}
private static class CountingReaderCallback implements org.skife.csv.ReaderCallback {
public int count = 0;
public int count;
@Override
public void onRow(final String[] fields) {

View File

@ -63,7 +63,7 @@ public class PerformanceTest {
private static int max = 11; // skip first test
private static int num = 0; // number of elapsed times recorded
private static int num; // number of elapsed times recorded
private static final long[] ELAPSED_TIMES = new long[max];
private static final CSVFormat format = CSVFormat.EXCEL;
@ -91,9 +91,7 @@ public class PerformanceTest {
final String[] tests;
if (argc > 1) {
tests = new String[argc - 1];
for (int i = 1; i < argc; i++) {
tests[i - 1] = args[i];
}
System.arraycopy(args, 1, tests, 0, argc - 1);
} else {
tests = new String[] { "file", "split", "extb", "exts", "csv", "csv-path", "csv-path-db", "csv-url", "lexreset", "lexnew" };
}