Add parameterized return type to Maps.and() (#597)

Fixes: #591
This commit is contained in:
Brian Demers 2020-06-08 13:59:41 -04:00 committed by GitHub
parent 6b02041be6
commit 43de9a34e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
## Release Notes
### 0.12.0
This minor release:
* Adds missing parameter type to `Maps.add()`, which removes an unchecked type warning.
### 0.11.1
This patch release:

View File

@ -63,7 +63,7 @@ public final class Maps {
* @param value the value of map entry to be added
* @return the current MapBuilder to allow for method chaining.
*/
MapBuilder and(K key, V value);
MapBuilder<K, V> and(K key, V value);
/**
* Returns a the resulting Map object from this MapBuilder.
@ -76,7 +76,7 @@ public final class Maps {
private final Map<K, V> data = new HashMap<>();
public MapBuilder and(K key, V value) {
public MapBuilder<K, V> and(K key, V value) {
data.put(key, value);
return this;
}