提交 68d9ede5 编写于 作者: N Nikita Koksharov

Fixed - RedissonSession.setAttribute method doesn't check the value for null...

Fixed - RedissonSession.setAttribute method doesn't check the value for null #2187 (thanks to jchobantonov)
上级 7ec36c23
......@@ -281,7 +281,10 @@ public class RedissonSession extends StandardSession {
public void setAttribute(String name, Object value, boolean notify) {
super.setAttribute(name, value, notify);
if (updateMode == UpdateMode.DEFAULT && map != null && value != null) {
if (value == null) {
return;
}
if (updateMode == UpdateMode.DEFAULT && map != null) {
fastPut(name, value);
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
......
......@@ -281,7 +281,10 @@ public class RedissonSession extends StandardSession {
public void setAttribute(String name, Object value, boolean notify) {
super.setAttribute(name, value, notify);
if (updateMode == UpdateMode.DEFAULT && map != null && value != null) {
if (value == null) {
return;
}
if (updateMode == UpdateMode.DEFAULT && map != null) {
fastPut(name, value);
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
......
......@@ -280,8 +280,11 @@ public class RedissonSession extends StandardSession {
@Override
public void setAttribute(String name, Object value, boolean notify) {
super.setAttribute(name, value, notify);
if (updateMode == UpdateMode.DEFAULT && map != null && value != null) {
if (value == null) {
return;
}
if (updateMode == UpdateMode.DEFAULT && map != null) {
fastPut(name, value);
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
......
......@@ -281,7 +281,10 @@ public class RedissonSession extends StandardSession {
public void setAttribute(String name, Object value, boolean notify) {
super.setAttribute(name, value, notify);
if (updateMode == UpdateMode.DEFAULT && map != null && value != null) {
if (value == null) {
return;
}
if (updateMode == UpdateMode.DEFAULT && map != null) {
fastPut(name, value);
}
if (updateMode == UpdateMode.AFTER_REQUEST) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册