Skip to content

Commit 9b2c7b1

Browse files
committed
Fix PMD findings.
1 parent 58f39ed commit 9b2c7b1

File tree

1 file changed

+5
-5
lines changed
  • powertools-parameters/powertools-parameters-dynamodb/src/test/java/software/amazon/lambda/powertools/parameters/dynamodb

1 file changed

+5
-5
lines changed

powertools-parameters/powertools-parameters-dynamodb/src/test/java/software/amazon/lambda/powertools/parameters/dynamodb/DynamoDbProviderTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void getValueWithoutResultsReturnsNull() {
125125
void getValueWithMalformedRowThrows() {
126126
// Arrange
127127
String key = "Key1";
128-
HashMap<String, AttributeValue> responseData = new HashMap<String, AttributeValue>();
128+
Map<String, AttributeValue> responseData = new HashMap<>();
129129
responseData.put("id", AttributeValue.fromS(key));
130130
responseData.put("not-value", AttributeValue.fromS("something"));
131131
Mockito.when(client.getItem(getItemValueCaptor.capture())).thenReturn(GetItemResponse.builder()
@@ -146,11 +146,11 @@ void getValues() {
146146
String val1 = "Val1";
147147
String subkey2 = "Subkey2";
148148
String val2 = "Val2";
149-
HashMap<String, AttributeValue> item1 = new HashMap<String, AttributeValue>();
149+
Map<String, AttributeValue> item1 = new HashMap<>();
150150
item1.put("id", AttributeValue.fromS(key));
151151
item1.put("sk", AttributeValue.fromS(subkey1));
152152
item1.put("value", AttributeValue.fromS(val1));
153-
HashMap<String, AttributeValue> item2 = new HashMap<String, AttributeValue>();
153+
Map<String, AttributeValue> item2 = new HashMap<>();
154154
item2.put("id", AttributeValue.fromS(key));
155155
item2.put("sk", AttributeValue.fromS(subkey2));
156156
item2.put("value", AttributeValue.fromS(val2));
@@ -188,7 +188,7 @@ void getValuesWithoutResultsReturnsNull() {
188188
void getMultipleValuesMissingSortKey_throwsException() {
189189
// Arrange
190190
String key = "Key1";
191-
HashMap<String, AttributeValue> item = new HashMap<String, AttributeValue>();
191+
Map<String, AttributeValue> item = new HashMap<>();
192192
item.put("id", AttributeValue.fromS(key));
193193
item.put("value", AttributeValue.fromS("somevalue"));
194194
QueryResponse response = QueryResponse.builder()
@@ -207,7 +207,7 @@ void getMultipleValuesMissingSortKey_throwsException() {
207207
void getValuesWithMalformedRowThrows() {
208208
// Arrange
209209
String key = "Key1";
210-
HashMap<String, AttributeValue> item1 = new HashMap<String, AttributeValue>();
210+
Map<String, AttributeValue> item1 = new HashMap<>();
211211
item1.put("id", AttributeValue.fromS(key));
212212
item1.put("sk", AttributeValue.fromS("some-subkey"));
213213
item1.put("not-value", AttributeValue.fromS("somevalue"));

0 commit comments

Comments
 (0)