-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Hi, there! While compiling log-synth, maven reported failures when performing tests, which prevented it from completing the building process. For example, when testing ZipSampler, an error was produced when trying to convert a string like "99,9999" to double by using Java's Double.parseDouble(). I realized it was happening because of "locale issues". I am in Brazil, using Xubuntu 18.04. In my terminals, the default locale is "pt_BR.UTF-8". Here, a comma (",") is used as decimal separator (instead of "."). In ZipSampler, for example, an Exception was being raised because of line 262:
return accept(Double.parseDouble(latitude), Double.parseDouble(longitude));
Lines 256 and 257 are as follows:
String longitude = location.get("longitude").asText();
String latitude = location.get("latitude").asText();
Due to my locale, asText() method produces floating point strings using "," as decimal separator. In order to get the code compiled, I executed
export LC_ALL=en_US.utf8
export LANG=en_US.utf8 (just in case)
on a terminal, ran
mvn clean
mvn package
and compilation was successfully finished.
If there is an easier way to solve this issue, please let me know. If not, I'd suggest to set locale to "en_US-UTF-8" on testing classes.
Also, if anything more than "mvn package" is required for compilation, please let me know. I could not find compilation instructions on log-synth documentation.
Thanks!