列表 null 返回空数组
This commit is contained in:
parent
a1147c242a
commit
f8f6a51cc4
@ -1,6 +1,7 @@
|
||||
package ink.wgink.pojo.app;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -76,7 +77,7 @@ public class AppTokenUser implements Serializable {
|
||||
}
|
||||
|
||||
public List<AppTokenUserRole> getRoles() {
|
||||
return roles;
|
||||
return roles == null ? new ArrayList<>() : roles;
|
||||
}
|
||||
|
||||
public void setRoles(List<AppTokenUserRole> roles) {
|
||||
@ -84,7 +85,7 @@ public class AppTokenUser implements Serializable {
|
||||
}
|
||||
|
||||
public List<AppTokenUserPosition> getPositions() {
|
||||
return positions;
|
||||
return positions == null ? new ArrayList<>() : positions;
|
||||
}
|
||||
|
||||
public void setPositions(List<AppTokenUserPosition> positions) {
|
||||
@ -92,7 +93,7 @@ public class AppTokenUser implements Serializable {
|
||||
}
|
||||
|
||||
public List<AppTokenUserDepartment> getDepartments() {
|
||||
return departments;
|
||||
return departments == null ? new ArrayList<>() : departments;
|
||||
}
|
||||
|
||||
public void setDepartments(List<AppTokenUserDepartment> departments) {
|
||||
|
Loading…
Reference in New Issue
Block a user