Skip to content

Commit

Permalink
refactor(user-data-manager): add return to avoid unnecesary log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanGmG committed Jun 9, 2023
1 parent a1d1261 commit 5352405
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void init() {
if (!jsonFile.exists()) {
jsonFile.createNewFile();
logger.info("Data created");
return;
}

if (jsonFile.length() == 0L) {
Expand All @@ -49,8 +50,7 @@ public void init() {
}

JsonElement jsonParsed = JsonParser.parseReader(new FileReader(jsonFile));
Type type = new TypeToken<Map<String, User>>() {
}.getType();
Type type = new TypeToken<Map<String, User>>() {}.getType();
Map<String, User> newUserData = new Gson().fromJson(jsonParsed, type);
users.putAll(newUserData);

Expand Down

0 comments on commit 5352405

Please sign in to comment.