修复因parentResult和childResult未初始化导致的空指针异常

This commit is contained in:
曹鹏飞 2024-03-21 08:37:44 +08:00
parent ddd8f8aceb
commit fc8409134e
1 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@ import com.nflg.product.bomnew.util.VersionUtil;
import lombok.Getter; import lombok.Getter;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -30,10 +31,10 @@ public class PBomUpgrade {
private List<BomNewPbomParentVO> allBom; private List<BomNewPbomParentVO> allBom;
@Getter @Getter
private List<BomNewPbomParentEntity> parentResult; private final List<BomNewPbomParentEntity> parentResult = new ArrayList<>();
@Getter @Getter
private List<BomNewPbomChildEntity> childResult; private final List<BomNewPbomChildEntity> childResult = new ArrayList<>();
public PBomUpgrade(BomNewPbomParentEntity root, List<BomNewPbomParentVO> allBom) { public PBomUpgrade(BomNewPbomParentEntity root, List<BomNewPbomParentVO> allBom) {