Browse Source

Pull request #15093: REPORT-137781 设计器设置文件数据集选择文件npe

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/release to fbp/release

* commit 'ecd3621494eb31928a8c0d673de4ff6fbfb7b16c':
  REPORT-137781 设计器设置文件数据集选择文件npe
  REPORT-137781 设计器设置文件数据集选择文件npe
fbp/merge
Destiny.Lin-林锦龙 2 months ago
parent
commit
f701914d43
  1. 6
      designer-base/src/main/java/com/fr/file/FileDataFILE.java

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

@ -9,6 +9,7 @@ import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.workspace.server.repository.tabledata.TableDataRepository;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
@ -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