Skip to content
Snippets Groups Projects
Commit cce7d4e8 authored by a.croix's avatar a.croix
Browse files

Merge branch 'test-sast'

parents ad57a608 29e49389
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
...@@ -8,6 +8,7 @@ import info.debatty.java.aggregation.WOWA; ...@@ -8,6 +8,7 @@ import info.debatty.java.aggregation.WOWA;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.text.DateFormat; import java.text.DateFormat;
...@@ -131,7 +132,8 @@ public final class Utils { ...@@ -131,7 +132,8 @@ public final class Utils {
throws IOException { throws IOException {
Genson genson = new Genson(); Genson genson = new Genson();
String data_json = new String(Files.readAllBytes(Paths.get(filename))); String data_json = new String(Files.readAllBytes(Paths.get(filename)),
StandardCharsets.UTF_8);
List<double[]> data = genson.deserialize( List<double[]> data = genson.deserialize(
data_json, data_json,
new GenericType<List<double[]>>() { new GenericType<List<double[]>>() {
...@@ -151,7 +153,8 @@ public final class Utils { ...@@ -151,7 +153,8 @@ public final class Utils {
Genson genson = new Genson(); Genson genson = new Genson();
String expected_json = new String( String expected_json = new String(
Files.readAllBytes(Paths.get(filename))); Files.readAllBytes(Paths.get(filename)),
StandardCharsets.UTF_8);
double[] expected = genson.deserialize(expected_json, double[].class); double[] expected = genson.deserialize(expected_json, double[].class);
return expected; return expected;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment