Skip to content

Commit 3c319a6

Browse files
committed
Use diamond operator for HashMaps in MetaStore
There isn't any change in behavior here. Just style fixes.
1 parent 5622875 commit 3c319a6

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/store

1 file changed

+3
-3
lines changed

src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/store/MetaStore.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public MetaStore(final AmazonDynamoDB ddb, final String tableName,
148148
this.ddbCtx = new EncryptionContext.Builder().withTableName(this.tableName)
149149
.withHashKeyName(DEFAULT_HASH_KEY).withRangeKeyName(DEFAULT_RANGE_KEY).build();
150150

151-
final Map<String, ExpectedAttributeValue> tmpExpected = new HashMap<String, ExpectedAttributeValue>();
151+
final Map<String, ExpectedAttributeValue> tmpExpected = new HashMap<>();
152152
tmpExpected.put(DEFAULT_HASH_KEY, new ExpectedAttributeValue().withExists(false));
153153
tmpExpected.put(DEFAULT_RANGE_KEY, new ExpectedAttributeValue().withExists(false));
154154
doesNotExist = Collections.unmodifiableMap(tmpExpected);
@@ -221,7 +221,7 @@ public void replicate(final String materialName, final long version, final MetaS
221221
}
222222

223223
private Map<String, AttributeValue> getMaterialItem(final String materialName, final long version) {
224-
final Map<String, AttributeValue> ddbKey = new HashMap<String, AttributeValue>();
224+
final Map<String, AttributeValue> ddbKey = new HashMap<>();
225225
ddbKey.put(DEFAULT_HASH_KEY, new AttributeValue().withS(materialName));
226226
ddbKey.put(DEFAULT_RANGE_KEY, new AttributeValue().withN(Long.toString(version)));
227227
final Map<String, AttributeValue> item = ddbGet(ddbKey);
@@ -294,7 +294,7 @@ private Map<String, AttributeValue> conditionalPut(final Map<String, AttributeVa
294294
ddb.putItem(put);
295295
return item;
296296
} catch (final ConditionalCheckFailedException ex) {
297-
final Map<String, AttributeValue> ddbKey = new HashMap<String, AttributeValue>();
297+
final Map<String, AttributeValue> ddbKey = new HashMap<>();
298298
ddbKey.put(DEFAULT_HASH_KEY, item.get(DEFAULT_HASH_KEY));
299299
ddbKey.put(DEFAULT_RANGE_KEY, item.get(DEFAULT_RANGE_KEY));
300300
return ddbGet(ddbKey);

0 commit comments

Comments
 (0)