Merge pull request #50972 from msridhar

* map-remove-nullable:
  Polish "Adapt to improvements in Nullaway 0.13.8"
  Adapt to improvements in Nullaway 0.13.8

Closes gh-50972
This commit is contained in:
Stéphane Nicoll
2026-07-21 14:49:21 +02:00
4 changed files with 4 additions and 4 deletions
@@ -164,7 +164,7 @@ class TestcontainersLifecycleOrderWithScopeIntegrationTests {
}
@Override
public Object remove(String name) {
public @Nullable Object remove(String name) {
synchronized (this) {
Object removed = this.instances.remove(name);
List<Runnable> destructor = this.destructors.get(name);
@@ -47,7 +47,7 @@ public class RestartScopeInitializer implements ApplicationContextInitializer<Co
}
@Override
public Object remove(String name) {
public @Nullable Object remove(String name) {
return Restarter.getInstance().removeAttribute(name);
}
@@ -450,7 +450,7 @@ public class Restarter {
return value;
}
public Object removeAttribute(String name) {
public @Nullable Object removeAttribute(String name) {
return this.attributes.remove(name);
}
@@ -68,7 +68,7 @@ public class WebDriverScope implements Scope {
}
@Override
public Object remove(String name) {
public @Nullable Object remove(String name) {
synchronized (this.instances) {
return this.instances.remove(name);
}