Browse Source

REPORT-137781 设计器设置文件数据集选择文件npe

fbp/merge
Destiny.Lin 2 months ago
parent
commit
dd3f695668
  1. 6
      designer-base/src/main/java/com/fr/file/FileDataFILE.java

6
designer-base/src/main/java/com/fr/file/FileDataFILE.java

@ -10,6 +10,7 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.tabledata.TableDataRepository;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -98,6 +99,9 @@ public class FileDataFILE extends FileNodeFILE{
FileDataFILE root = null;
if (!this.builded) {
root = buildTree();
if (root == null) {
return new FILE[0];
}
FileDataFILE dataFILE = root.getFileDataFILE(this.id);
this.setChildren(dataFILE.getChildren());
this.setType(dataFILE.getType());
@ -125,7 +129,7 @@ public class FileDataFILE extends FileNodeFILE{
return null;
}
private FileDataFILE buildTree() {
private @Nullable FileDataFILE buildTree() {
List<FileNodeBean> beans = TableDataRepository.getInstance().getFileList(type);
Map<String, FileDataFILE> tree = new HashMap<>();
FileDataFILE root = null;

Loading…
Cancel
Save