mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-05-20 14:57:12 +08:00
ofNullable
This commit is contained in:
@@ -93,7 +93,7 @@ public class SimpleAuthentication implements Authentication {
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends Serializable> Optional<T> getAttribute(String name) {
|
||||
return Optional.of((T) attributes.get(name));
|
||||
return Optional.ofNullable((T) attributes.get(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user