Skip to content

Commit 75916c5

Browse files
committed
rename close method
1 parent 2a5326f commit 75916c5

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

sdk/src/main/java/software/amazon/lambda/durable/DurableContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public DurableLogger getLogger() {
308308
if (logger == null) {
309309
synchronized (this) {
310310
if (logger == null) {
311-
logger = new DurableLogger(LoggerFactory.getLogger(StepContext.class), this);
311+
logger = new DurableLogger(LoggerFactory.getLogger(DurableContext.class), this);
312312
}
313313
}
314314
}
@@ -321,7 +321,7 @@ public DurableLogger getLogger() {
321321
*/
322322
public void close() {
323323
if (logger != null) {
324-
logger.clearThreadProperties();
324+
logger.close();
325325
}
326326
}
327327

sdk/src/main/java/software/amazon/lambda/durable/StepContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public DurableLogger getLogger() {
5252
@Override
5353
public void close() {
5454
if (logger != null) {
55-
logger.clearThreadProperties();
55+
logger.close();
5656
}
5757
}
5858
}

sdk/src/main/java/software/amazon/lambda/durable/logging/DurableLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public DurableLogger(Logger delegate, BaseContext context) {
5959
}
6060
}
6161

62-
public void clearThreadProperties() {
62+
public void close() {
6363
MDC.clear();
6464
}
6565

sdk/src/test/java/software/amazon/lambda/durable/logging/DurableLoggerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void clearThreadPropertiesRemovesMdc() {
120120
var logger = createLogger(Mode.EXECUTING, Suppression.ENABLED);
121121
mdcMock.clearInvocations();
122122

123-
logger.clearThreadProperties();
123+
logger.close();
124124

125125
mdcMock.verify(() -> MDC.clear());
126126
}

0 commit comments

Comments
 (0)