master #59

Closed
claudio.atzori wants to merge 3221 commits from master into stable_ids
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 287753417d - Show all commits

View File

@ -16,7 +16,7 @@ public class Community implements Serializable {
private List<String> subjects = new ArrayList<>();
private List<Provider> providers = new ArrayList<>();
private List<ZenodoCommunity> zenodoCommunities = new ArrayList<>();
private SelectionConstraints constraints = new SelectionConstraints();
private SelectionConstraints constraints;
public String toJson() {
final Gson g = new Gson();
@ -27,7 +27,7 @@ public class Community implements Serializable {
return !getSubjects().isEmpty()
|| !getProviders().isEmpty()
|| !getZenodoCommunities().isEmpty()
|| constraints != null;
|| !getConstraints().getCriteria().isEmpty();
}
public String getId() {

View File

@ -92,7 +92,7 @@ public class CommunityConfigurationFactory {
private static SelectionConstraints parseConstrains(Node node) {
Node advConstsNode = node.selectSingleNode("./advancedConstraints");
if (advConstsNode == null || StringUtils.isBlank(StringUtils.trim(advConstsNode.getText()))) {
return null;
return new SelectionConstraints();
}
SelectionConstraints selectionConstraints = new Gson()
.fromJson(advConstsNode.getText(), SelectionConstraints.class);