- if (serviceRate.intValue() == 100) {
- List<OpucnTribSlotDef> opucnTribSlotDefList = new ArrayList<>();
- opucnTribSlotDefList.add(pathDescription.getAToZDirection().getMinTribSlot());
- opucnTribSlotDefList.add(pathDescription.getAToZDirection().getMaxTribSlot());
+ if (serviceRate.intValue() == 100 && pathDescription.getAToZDirection().getMinTribSlot() != null
+ && pathDescription.getAToZDirection().getMaxTribSlot() != null) {
+ Set<OpucnTribSlotDef> opucnTribSlotDefList = new HashSet<>();
+ opucnTribSlotDefList.add(
+ new OpucnTribSlotDef(pathDescription.getAToZDirection().getMinTribSlot().getValue()));
+ opucnTribSlotDefList.add(
+ new OpucnTribSlotDef(pathDescription.getAToZDirection().getMaxTribSlot().getValue()));