1
0
Fork 0

[EOSC TAG] added fix for NPE on subjects

This commit is contained in:
Miriam Baglioni 2022-07-29 10:54:20 +02:00
parent 37cfda0fc5
commit 3329b6ce6b
1 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,8 @@ public class SparkEoscTag {
} }
private static boolean containsCriteriaNotebook(Software s) { private static boolean containsCriteriaNotebook(Software s) {
if(!Optional.ofNullable(s.getSubject()).isPresent())
return false;
if (s.getSubject().stream().anyMatch(sbj -> sbj.getValue().toLowerCase().contains("jupyter"))) if (s.getSubject().stream().anyMatch(sbj -> sbj.getValue().toLowerCase().contains("jupyter")))
return true; return true;
if (s if (s