@@ -148,7 +148,7 @@ public MetaStore(final AmazonDynamoDB ddb, final String tableName,
148
148
this .ddbCtx = new EncryptionContext .Builder ().withTableName (this .tableName )
149
149
.withHashKeyName (DEFAULT_HASH_KEY ).withRangeKeyName (DEFAULT_RANGE_KEY ).build ();
150
150
151
- final Map <String , ExpectedAttributeValue > tmpExpected = new HashMap <String , ExpectedAttributeValue >();
151
+ final Map <String , ExpectedAttributeValue > tmpExpected = new HashMap <>();
152
152
tmpExpected .put (DEFAULT_HASH_KEY , new ExpectedAttributeValue ().withExists (false ));
153
153
tmpExpected .put (DEFAULT_RANGE_KEY , new ExpectedAttributeValue ().withExists (false ));
154
154
doesNotExist = Collections .unmodifiableMap (tmpExpected );
@@ -221,7 +221,7 @@ public void replicate(final String materialName, final long version, final MetaS
221
221
}
222
222
223
223
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 <>();
225
225
ddbKey .put (DEFAULT_HASH_KEY , new AttributeValue ().withS (materialName ));
226
226
ddbKey .put (DEFAULT_RANGE_KEY , new AttributeValue ().withN (Long .toString (version )));
227
227
final Map <String , AttributeValue > item = ddbGet (ddbKey );
@@ -294,7 +294,7 @@ private Map<String, AttributeValue> conditionalPut(final Map<String, AttributeVa
294
294
ddb .putItem (put );
295
295
return item ;
296
296
} catch (final ConditionalCheckFailedException ex ) {
297
- final Map <String , AttributeValue > ddbKey = new HashMap <String , AttributeValue >();
297
+ final Map <String , AttributeValue > ddbKey = new HashMap <>();
298
298
ddbKey .put (DEFAULT_HASH_KEY , item .get (DEFAULT_HASH_KEY ));
299
299
ddbKey .put (DEFAULT_RANGE_KEY , item .get (DEFAULT_RANGE_KEY ));
300
300
return ddbGet (ddbKey );
0 commit comments