zhouhao před 8 roky
rodič
revize
602b992bb2

+ 1 - 1
hsweb-system/hsweb-system-authorization/hsweb-system-authorization-service/hsweb-system-authorization-service-simple/src/main/java/org/hswebframework/web/service/authorization/simple/SimpleAuthentication.java

@@ -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