Skip to content

Commit

Permalink
refactoring iluwatar#1012: Format specifiers should be used instead o…
Browse files Browse the repository at this point in the history
…f string concatenation.
  • Loading branch information
kongleong86 committed Oct 21, 2023
1 parent 0c1f302 commit b6f5d7a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public OutOfStock(String userName, String itemName) {

@Override
public void show() {
LOGGER.info("Out of stock: {} for user = {} to buy", itemName, userName);
if (LOGGER.isInfoEnabled()) {
LOGGER.info(String.format("Out of stock: %s for user = %s to buy", itemName, userName));
}
}
}

0 comments on commit b6f5d7a

Please sign in to comment.