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 2015/07/13 12:32:36 UTC
[2/5] syncope git commit: [SYNCOPE-682] #resolve
[SYNCOPE-682] #resolve
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f5df7f5c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f5df7f5c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f5df7f5c
Branch: refs/heads/master
Commit: f5df7f5cb3f5dfde39c90cbb85fe0971345a8728
Parents: 73d0975
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Jul 13 11:57:49 2015 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Jul 13 11:57:49 2015 +0200
----------------------------------------------------------------------
.../core/persistence/beans/AccountPolicy.java | 3 +--
.../syncope/core/rest/PolicyTestITCase.java | 19 +++++++++++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5df7f5c/core/src/main/java/org/apache/syncope/core/persistence/beans/AccountPolicy.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/persistence/beans/AccountPolicy.java b/core/src/main/java/org/apache/syncope/core/persistence/beans/AccountPolicy.java
index 9a93763..4f38285 100644
--- a/core/src/main/java/org/apache/syncope/core/persistence/beans/AccountPolicy.java
+++ b/core/src/main/java/org/apache/syncope/core/persistence/beans/AccountPolicy.java
@@ -44,11 +44,10 @@ public class AccountPolicy extends Policy {
inverseJoinColumns =
@JoinColumn(name = "resource_name"))
@Valid
- private Set<ExternalResource> resources;
+ private Set<ExternalResource> resources = new HashSet<ExternalResource>();
public AccountPolicy() {
this(false);
- this.resources = new HashSet<ExternalResource>();
}
public AccountPolicy(final boolean global) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/f5df7f5c/core/src/test/java/org/apache/syncope/core/rest/PolicyTestITCase.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/syncope/core/rest/PolicyTestITCase.java b/core/src/test/java/org/apache/syncope/core/rest/PolicyTestITCase.java
index 18b1e3f..66463d1 100644
--- a/core/src/test/java/org/apache/syncope/core/rest/PolicyTestITCase.java
+++ b/core/src/test/java/org/apache/syncope/core/rest/PolicyTestITCase.java
@@ -227,12 +227,27 @@ public class PolicyTestITCase extends AbstractTest {
public void issueSYNCOPE553() {
AccountPolicyTO policy = new AccountPolicyTO(false);
policy.setDescription("SYNCOPE553");
-
+
+ final AccountPolicySpec accountPolicySpec = new AccountPolicySpec();
+ accountPolicySpec.setMinLength(3);
+ accountPolicySpec.setMaxLength(8);
+ policy.setSpecification(accountPolicySpec);
+
+ policy = createPolicy(policy);
+ assertNotNull(policy);
+ }
+
+ @Test
+ public void issueSYNCOPE682() {
+ AccountPolicyTO policy = new AccountPolicyTO(false);
+ policy.setDescription("SYNCOPE682");
+ policy.getResources().add(RESOURCE_NAME_LDAP);
+
final AccountPolicySpec accountPolicySpec = new AccountPolicySpec();
accountPolicySpec.setMinLength(3);
accountPolicySpec.setMaxLength(8);
policy.setSpecification(accountPolicySpec);
-
+
policy = createPolicy(policy);
assertNotNull(policy);
}