Skip to content

Commit f82da97

Browse files
committed
Add more nullability annotations to module/spring-boot-web-server
See gh-46587
1 parent cc85b18 commit f82da97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

module/spring-boot-web-server/src/main/java/org/springframework/boot/web/server/context/WebServerApplicationContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public interface WebServerApplicationContext extends ApplicationContext {
7070
* @return {@code true} if the server namespace of the context matches
7171
* @since 2.1.8
7272
*/
73-
static boolean hasServerNamespace(ApplicationContext context, String serverNamespace) {
73+
static boolean hasServerNamespace(@Nullable ApplicationContext context, String serverNamespace) {
7474
return (context instanceof WebServerApplicationContext webServerApplicationContext)
7575
&& ObjectUtils.nullSafeEquals(webServerApplicationContext.getServerNamespace(), serverNamespace);
7676
}
@@ -83,7 +83,7 @@ static boolean hasServerNamespace(ApplicationContext context, String serverNames
8383
* {@link WebServerApplicationContext}
8484
* @since 2.6.0
8585
*/
86-
static @Nullable String getServerNamespace(ApplicationContext context) {
86+
static @Nullable String getServerNamespace(@Nullable ApplicationContext context) {
8787
return (context instanceof WebServerApplicationContext configurableContext)
8888
? configurableContext.getServerNamespace() : null;
8989

0 commit comments

Comments
 (0)