From af708933b24bc4735ca46784c1eb5e7d807d355e Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 31 Jul 2020 22:25:09 +0300 Subject: [PATCH] Use BufferedReader for iso-codes JSON --- src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java b/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java index 73886dc..d445f66 100644 --- a/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java +++ b/src/main/java/org/cgiar/cgspace/ctasks/CountryCodeTagger.java @@ -72,7 +72,7 @@ public class CountryCodeTagger extends AbstractCurationTask } else { Gson gson = new Gson(); - BufferedReader reader = new BufferedReader(new FileReader(isocodesJsonPath)); + BufferedReader reader = new BufferedReader(new InputStreamReader(this.getClass().getResourceAsStream(isocodesJsonPath))); CountriesVocabulary isocodesCountriesJson = gson.fromJson(reader, CountriesVocabulary.class); reader.close();