Skip to content

Commit 8ca99cc

Browse files
Use this() to call back to a single constructor
1 parent 0558d3d commit 8ca99cc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/main/java/org/dataloader/stats/context/IncrementBatchLoadCountByStatisticsContext.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ public IncrementBatchLoadCountByStatisticsContext(List<K> keys, List<Object> cal
1414
}
1515

1616
public IncrementBatchLoadCountByStatisticsContext(K key, Object callContext) {
17-
this.keys = Collections.singletonList(key);
18-
this.callContexts = Collections.singletonList(callContext);
17+
this(Collections.singletonList(key), Collections.singletonList(callContext));
1918
}
2019

2120
public List<K> getKeys() {

src/main/java/org/dataloader/stats/context/IncrementCacheHitCountStatisticsContext.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ public IncrementCacheHitCountStatisticsContext(K key, Object callContext) {
1111
}
1212

1313
public IncrementCacheHitCountStatisticsContext(K key) {
14-
this.key = key;
15-
this.callContext = null;
14+
this(key, null);
1615
}
1716

1817
public K getKey() {

0 commit comments

Comments
 (0)