avoid to NPE in case of null instances
This commit is contained in:
parent
06def0c0cb
commit
8e97598eb4
|
@ -184,13 +184,16 @@ public class CreateRelatedEntitiesJob_phase1 {
|
||||||
re.setDateofacceptance(getValue(result.getDateofacceptance()));
|
re.setDateofacceptance(getValue(result.getDateofacceptance()));
|
||||||
re.setPublisher(getValue(result.getPublisher()));
|
re.setPublisher(getValue(result.getPublisher()));
|
||||||
re.setResulttype(result.getResulttype());
|
re.setResulttype(result.getResulttype());
|
||||||
re
|
if (Objects.nonNull(result.getInstance())) {
|
||||||
.setInstances(
|
re
|
||||||
result
|
.setInstances(
|
||||||
.getInstance()
|
result
|
||||||
.stream()
|
.getInstance()
|
||||||
.limit(ProvisionConstants.MAX_INSTANCES)
|
.stream()
|
||||||
.collect(Collectors.toList()));
|
.filter(Objects::nonNull)
|
||||||
|
.limit(ProvisionConstants.MAX_INSTANCES)
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
|
||||||
// TODO still to be mapped
|
// TODO still to be mapped
|
||||||
// re.setCodeRepositoryUrl(j.read("$.coderepositoryurl"));
|
// re.setCodeRepositoryUrl(j.read("$.coderepositoryurl"));
|
||||||
|
|
Loading…
Reference in New Issue