Skip to content

Commit 5df269f

Browse files
retroqpivovarit
authored andcommitted
BAEL-1041 Caffeine (eugenp#2734)
* BAEL-748 quick guide to @value * BAEL-748 changes from review * BAEL-748 inject comma-separated values into array * BAEL-768 Introduction to Netty * BAEL-768 remove commented code * BAEL-861 Introduction to Awaitility * BAEL-861 rename Test to UnitTest * BAEL-1041 Introduction in Caffeine * BAEL-1041 fix test * BAEL-1041 fix formatting * BAEL-1041 fix expected/actual order * BAEL-1041 remove trailing underscore * Formatting after merge * BAEL-1041 add spaces between data and assertions * BAEL-1041 soft values example * BAEL-1041 remove duplicate dependency * BAEL-1041 formatting fix * BAEL-1041 formatting fix * BAEL-1041 use logger instead of sout
1 parent 56af2a7 commit 5df269f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎libraries/src/main/java/com/baeldung/caffeine/DataObject.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
package com.baeldung.caffeine;
22

3+
import org.slf4j.Logger;
4+
import org.slf4j.LoggerFactory;
5+
36
final class DataObject {
47
private final String data;
58

69
private static int objectCounter = 0;
10+
private static final Logger log = LoggerFactory.getLogger(DataObject.class);
711

812
private DataObject(String data) {
913
this.data = data;
@@ -22,7 +26,7 @@ public String toString() {
2226

2327
public static DataObject get(String data) {
2428
objectCounter++;
25-
System.out.println(String.format("Initializing DataObject#%d with data '%s'", objectCounter, data));
29+
log.info("Init DataObject#{} with '{}'", objectCounter, data);
2630
return new DataObject(data);
2731
}
2832
}

0 commit comments

Comments
 (0)