Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
6a021878
by Tony Chemit at 2022-03-26T15:14:40+01:00
1 changed file:
Changes:
| ... | ... | @@ -89,6 +89,7 @@ import java.nio.file.Files; |
| 89 | 89 | import java.nio.file.Path;
|
| 90 | 90 | import java.text.ParseException;
|
| 91 | 91 | import java.text.SimpleDateFormat;
|
| 92 | +import java.util.ArrayList;
|
|
| 92 | 93 | import java.util.Arrays;
|
| 93 | 94 | import java.util.Calendar;
|
| 94 | 95 | import java.util.Comparator;
|
| ... | ... | @@ -909,7 +910,7 @@ public class ClientConfig extends GeneratedClientConfig implements TripMapConfig |
| 909 | 910 | |
| 910 | 911 | protected <T> List<T> loadJsonList(Path path, Class<T> type) {
|
| 911 | 912 | if (Files.notExists(path)) {
|
| 912 | - return null;
|
|
| 913 | + return new ArrayList<>();
|
|
| 913 | 914 | }
|
| 914 | 915 | try (BufferedReader bufferedReader = Files.newBufferedReader(path)) {
|
| 915 | 916 | return getGsonSupplier().get().fromJson(bufferedReader, ImmutableListAdapter.listOf(type));
|