Skip to content

Commit e52d7ca

Browse files
meotchwilliamsmeotch
authored andcommitted
fix: add null check to Session userId before setting userId on MdxBase
1 parent 3c9fd2a commit e52d7ca

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • mdx-models/src/main/java/com/mx/path/model/mdx/model

mdx-models/src/main/java/com/mx/path/model/mdx/model/MdxBase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6+
import com.mx.path.core.common.lang.Strings;
67
import com.mx.path.core.common.model.ModelBase;
78
import com.mx.path.core.common.model.Warning;
89
import com.mx.path.core.context.Session;
@@ -13,7 +14,7 @@ public abstract class MdxBase<T> extends ModelBase<T> {
1314
private List<Warning> warnings;
1415

1516
public MdxBase() {
16-
if (Session.current() != null) {
17+
if (Session.current() != null && Strings.isNotBlank(Session.current().getUserId())) {
1718
this.setUserId(Session.current().getUserId());
1819
}
1920
}

0 commit comments

Comments
 (0)