Skip to content

Commit f822b19

Browse files
committed
CountryService.suggestCountryForUser(): separate log message when there is no suggestion.
No functional changes.
1 parent 8c940d3 commit f822b19

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/main/java/ru/mystamps/web/service/CountryServiceImpl.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,15 @@ public String suggestCountryForUser(Integer userId) {
185185
}
186186

187187
slug = countryDao.findPopularCountryInCollection(userId);
188-
LOG.info(
189-
"Country {} has been suggested to user #{} as popular in his collection",
190-
slug,
191-
userId
192-
);
188+
if (slug != null) {
189+
LOG.info(
190+
"Country {} has been suggested to user #{} as popular in his collection",
191+
slug,
192+
userId
193+
);
194+
}
195+
196+
LOG.info("Couldn't suggest a country for user #{}", userId);
193197

194198
return slug;
195199
}

0 commit comments

Comments
 (0)