Skip to content

Commit 27dad71

Browse files
authored
Update DynamoDBPersistenceStore.java
Fixed variable naming Sonar issue
1 parent 6336252 commit 27dad71

File tree

1 file changed

+4
-4
lines changed
  • powertools-idempotency/powertools-idempotency-dynamodb/src/main/java/software/amazon/lambda/powertools/idempotency/persistence/dynamodb

1 file changed

+4
-4
lines changed

powertools-idempotency/powertools-idempotency-dynamodb/src/main/java/software/amazon/lambda/powertools/idempotency/persistence/dynamodb/DynamoDBPersistenceStore.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,19 @@ private DynamoDBPersistenceStore(String tableName,
124124
@Override
125125
public void beforeCheckpoint(org.crac.Context<? extends Resource> context) throws Exception {
126126
try {
127-
String PRIMING_RECORD_KEY = "__invoke_prime__";
127+
String primingRecordKey = "__invoke_prime__";
128128
Instant now = Instant.now();
129129
long expiry = now.plus(3600, ChronoUnit.SECONDS).getEpochSecond();
130130
DataRecord primingDataRecord = new DataRecord(
131-
PRIMING_RECORD_KEY,
131+
primingRecordKey,
132132
DataRecord.Status.COMPLETED,
133133
expiry,
134134
null, // no data
135135
null // no validation
136136
);
137137
putRecord(primingDataRecord, Instant.now());
138-
getRecord(PRIMING_RECORD_KEY);
139-
deleteRecord(PRIMING_RECORD_KEY);
138+
getRecord(primingRecordKey);
139+
deleteRecord(primingRecordKey);
140140
} catch (Exception unknown) {
141141
// This is unexpected but we must continue without any interruption
142142
}

0 commit comments

Comments
 (0)