Skip to content

Commit 7184cb4

Browse files
committed
Add @nullable to AbstractConfiguredSecurityBuilder.getSharedObject()
Signed-off-by: Guillaume HUSTA <[email protected]>
1 parent 27ae318 commit 7184cb4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

config/src/main/java/org/springframework/security/config/annotation/AbstractConfiguredSecurityBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.apache.commons.logging.Log;
2828
import org.apache.commons.logging.LogFactory;
2929

30+
import org.jspecify.annotations.Nullable;
3031
import org.springframework.security.config.Customizer;
3132
import org.springframework.security.config.ObjectPostProcessor;
3233
import org.springframework.security.config.annotation.web.builders.WebSecurity;
@@ -181,6 +182,7 @@ public <C> void setSharedObject(Class<C> sharedType, C object) {
181182
* @param sharedType the type of the shared Object
182183
* @return the shared Object or null if it is not found
183184
*/
185+
@Nullable
184186
@SuppressWarnings("unchecked")
185187
public <C> C getSharedObject(Class<C> sharedType) {
186188
return (C) this.sharedObjects.get(sharedType);

0 commit comments

Comments
 (0)