You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2022/03/21 10:10:42 UTC
[syncope] 02/02: Workaround for CXF-8680
This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit d452cbb4ee5cb44110708ff2440a0aba9c5bdc35
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon Mar 21 10:59:58 2022 +0100
Workaround for CXF-8680
---
.../org/apache/syncope/common/rest/api/beans/AbstractCSVSpec.java | 8 +++++---
.../org/apache/syncope/common/rest/api/beans/CSVPullSpec.java | 8 +++++---
.../java/org/apache/syncope/core/logic/ReconciliationLogic.java | 4 ++--
.../syncope/core/provisioning/java/pushpull/InboundMatcher.java | 2 +-
4 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/AbstractCSVSpec.java b/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/AbstractCSVSpec.java
index 098bbfc..5088e70 100644
--- a/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/AbstractCSVSpec.java
+++ b/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/AbstractCSVSpec.java
@@ -24,6 +24,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotNull;
+import javax.ws.rs.DefaultValue;
import javax.ws.rs.QueryParam;
import org.apache.syncope.common.lib.types.MatchingRule;
import org.apache.syncope.common.lib.types.UnmatchingRule;
@@ -143,7 +144,7 @@ public abstract class AbstractCSVSpec implements Serializable {
protected String nullValue = "";
- protected boolean allowComments;
+ protected Boolean allowComments;
protected UnmatchingRule unmatchingRule = UnmatchingRule.PROVISION;
@@ -236,11 +237,12 @@ public abstract class AbstractCSVSpec implements Serializable {
@Parameter(name = PARAM_ALLOWCOMMENTS, description = "are hash comments, e.g. lines where the first non-whitespace "
+ "character is '#' allowed? if so, they will be skipped without processing", schema =
@Schema(implementation = boolean.class, defaultValue = "false"))
- public boolean isAllowComments() {
- return allowComments;
+ public Boolean getAllowComments() {
+ return allowComments == null ? Boolean.FALSE : allowComments;
}
@QueryParam(PARAM_ALLOWCOMMENTS)
+ @DefaultValue("false")
public void setAllowComments(final boolean allowComments) {
this.allowComments = allowComments;
}
diff --git a/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/CSVPullSpec.java b/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/CSVPullSpec.java
index ac6d309..06d9a49 100644
--- a/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/CSVPullSpec.java
+++ b/common/idm/rest-api/src/main/java/org/apache/syncope/common/rest/api/beans/CSVPullSpec.java
@@ -23,6 +23,7 @@ import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.validation.constraints.NotNull;
+import javax.ws.rs.DefaultValue;
import javax.ws.rs.QueryParam;
import org.apache.syncope.common.lib.SyncopeConstants;
import org.apache.syncope.common.lib.types.ConflictResolutionAction;
@@ -75,7 +76,7 @@ public class CSVPullSpec extends AbstractCSVSpec {
private Set<String> ignoreColumns = new HashSet<>();
- private boolean remediation;
+ private Boolean remediation;
private ConflictResolutionAction conflictResolutionAction = ConflictResolutionAction.IGNORE;
@@ -109,11 +110,12 @@ public class CSVPullSpec extends AbstractCSVSpec {
this.ignoreColumns = ignoreColumns;
}
- public boolean isRemediation() {
- return remediation;
+ public Boolean getRemediation() {
+ return remediation == null ? Boolean.FALSE : remediation;
}
@QueryParam("remediation")
+ @DefaultValue("false")
public void setRemediation(final boolean remediation) {
this.remediation = remediation;
}
diff --git a/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ReconciliationLogic.java b/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ReconciliationLogic.java
index 8fe2fe4..ef107f7 100644
--- a/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ReconciliationLogic.java
+++ b/core/idm/logic/src/main/java/org/apache/syncope/core/logic/ReconciliationLogic.java
@@ -528,7 +528,7 @@ public class ReconciliationLogic extends AbstractTransactionalLogic<EntityTO> {
setQuoteChar(spec.getQuoteChar()).
setLineSeparator(spec.getLineSeparator()).
setNullValue(spec.getNullValue()).
- setAllowComments(spec.isAllowComments());
+ setAllowComments(spec.getAllowComments());
if (spec.getEscapeChar() != null) {
schemaBuilder.setEscapeChar(spec.getEscapeChar());
}
@@ -661,7 +661,7 @@ public class ReconciliationLogic extends AbstractTransactionalLogic<EntityTO> {
PullTaskTO pullTask = new PullTaskTO();
pullTask.setDestinationRealm(spec.getDestinationRealm());
- pullTask.setRemediation(spec.isRemediation());
+ pullTask.setRemediation(spec.getRemediation());
pullTask.setMatchingRule(spec.getMatchingRule());
pullTask.setUnmatchingRule(spec.getUnmatchingRule());
pullTask.getActions().addAll(spec.getProvisioningActions());
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java
index 8369510..7ad2241 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java
@@ -389,7 +389,7 @@ public class InboundMatcher {
}
}
} catch (RuntimeException e) {
- LOG.error("Could not match {} with any existing {}", syncDelta, provision.getAnyType(), e);
+ LOG.error("Could not match {} with any existing {}", syncDelta, provision.getAnyType().getKey(), e);
}
if (result.size() == 1 && result.get(0).getMatchTarget() == MatchType.ANY) {