Add @⁠Nullable annotations when treating Map.remove() as returning @⁠Nullable

Closes gh-37067

Signed-off-by: Manu Sridharan <msridhar@gmail.com>
This commit is contained in:
Manu Sridharan
2026-07-20 11:02:55 +03:00
committed by Sam Brannen
parent 8fb2f72282
commit 233725c8f5
2 changed files with 2 additions and 2 deletions
@@ -117,7 +117,7 @@ final class CompositeMap<K, V extends @Nullable Object> implements Map<K, V> {
}
@Override
public V remove(Object key) {
public @Nullable V remove(Object key) {
V firstResult = this.first.remove(key);
V secondResult = this.second.remove(key);
if (firstResult != null) {
@@ -510,7 +510,7 @@ public class StompHeaders implements MultiValueMap<String, String>, Serializable
}
@Override
public List<String> remove(Object key) {
public @Nullable List<String> remove(Object key) {
return this.headers.remove(key);
}