prepareModuleSubsets(moduleReferencesFromCmHandle, existingModuleReferences, unknownModuleReferences);
final Map<String, String> newYangResourcesModuleNameToContentMap;
- if (unknownModuleReferences.size() > 0) {
- newYangResourcesModuleNameToContentMap = getNewYangResourcesFromDmi(persistenceCmHandle,
- unknownModuleReferences, cmHandlePropertiesAsMap);
- } else {
+ if (unknownModuleReferences.isEmpty()) {
newYangResourcesModuleNameToContentMap = new HashMap<>();
+ } else {
+ newYangResourcesModuleNameToContentMap = getNewYangResourcesFromDmi(persistenceCmHandle,
+ unknownModuleReferences, cmHandlePropertiesAsMap);
}
cpsModuleService.createSchemaSetFromModules(NF_PROXY_DATASPACE_NAME, persistenceCmHandle.getId(),
newYangResourcesModuleNameToContentMap, existingModuleReferences);
final Map<String, FragmentEntity> existingChildrenByXpath = existingFragmentEntity.getChildFragments()
.stream().collect(Collectors.toMap(FragmentEntity::getXpath, childFragmentEntity -> childFragmentEntity));
- final Collection updatedChildFragments = new HashSet<FragmentEntity>();
+ final Collection<FragmentEntity> updatedChildFragments = new HashSet<>();
for (final DataNode submittedChildDataNode : submittedDataNode.getChildDataNodes()) {
final FragmentEntity childFragment;