mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 15:27:13 +00:00
* 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:
@@ -34,7 +34,7 @@ public class ReceiptDto implements ReceiptViewModel {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ReceiptDto.class);
|
||||
|
||||
private Double price;
|
||||
private final Double price;
|
||||
|
||||
public ReceiptDto(Double price) {
|
||||
this.price = price;
|
||||
@@ -46,6 +46,6 @@ public class ReceiptDto implements ReceiptViewModel {
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
LOGGER.info("Receipt: " + price + " paid");
|
||||
LOGGER.info(String.format("Receipt: %s paid", price));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user