You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, great library 😀 I'm using it for one of my projects but I encountered a problem.
I have unit tests that instantiate the Categories and Confusbles objects as required (I tried both fromInternal and fromJson).
When running from my local machine everything works as expected but when I try to build my project from my Jenkins machine the tests fail due to the following error: com.google.gson.JsonSyntaxException: duplicate key: ???
I tried to investigate and came to the conclusion that the categories.json and confusables.json files are not read properly on my Jenkins machine, causing some symbols to be read the same, as '???', and therefore when these files are loaded to their internal data structure in code we get this error.
I looked at the code and noticed that the method that loads these json files is: UsesJsonData -> boolean loadJson(InputStream stream)
In this method if I change the line: try (Reader reader = new InputStreamReader(stream))
and specify UTF-8 like this: try (Reader reader = new InputStreamReader(stream, StandardCharsets.UTF_8))
my tests are working and I'm not getting this exception anymore.
Would it be possible to add this fix?
The text was updated successfully, but these errors were encountered:
I expected to release v1.1.0 with the fix and up-to-date dependencies, but I am stuck with new Maven release plugin and PGP-signin hell.
I’ll try to release this version, but I’m not at home and I’m not sure it will work. If it will require a release from my home computer, this will not be before the 3rd of January 2022.
First off, great library 😀 I'm using it for one of my projects but I encountered a problem.
I have unit tests that instantiate the Categories and Confusbles objects as required (I tried both
fromInternal
andfromJson
).When running from my local machine everything works as expected but when I try to build my project from my Jenkins machine the tests fail due to the following error:
com.google.gson.JsonSyntaxException: duplicate key: ???
I tried to investigate and came to the conclusion that the categories.json and confusables.json files are not read properly on my Jenkins machine, causing some symbols to be read the same, as '???', and therefore when these files are loaded to their internal data structure in code we get this error.
I looked at the code and noticed that the method that loads these json files is:
UsesJsonData -> boolean loadJson(InputStream stream)
In this method if I change the line:
try (Reader reader = new InputStreamReader(stream))
and specify UTF-8 like this:
try (Reader reader = new InputStreamReader(stream, StandardCharsets.UTF_8))
my tests are working and I'm not getting this exception anymore.
Would it be possible to add this fix?
The text was updated successfully, but these errors were encountered: