refactoring #1012: Format specifiers should be used instead of string concatenation. (#2715)

* refactoring #1012: Format specifiers should be used instead of string concatenation.

* refactoring #1012: Format specifiers should be used instead of string concatenation.

* refactoring #1012: Remove isInfoEnabled check
This commit is contained in:
kongleong86
2023-12-02 12:25:00 +00:00
committed by GitHub
parent a82966f202
commit 301317533e
9 changed files with 19 additions and 19 deletions
@@ -34,8 +34,8 @@ public class OutOfStock implements ReceiptViewModel {
private static final Logger LOGGER = LoggerFactory.getLogger(OutOfStock.class);
private String userName;
private String itemName;
private final String userName;
private final String itemName;
public OutOfStock(String userName, String itemName) {
this.userName = userName;
@@ -44,6 +44,6 @@ public class OutOfStock implements ReceiptViewModel {
@Override
public void show() {
LOGGER.info("Out of stock: " + itemName + " for user = " + userName + " to buy");
LOGGER.info(String.format("Out of stock: %s for user = %s to buy", itemName, userName));
}
}