syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [1/5] syncope git commit: [SYNCOPE-682] #resolve
Date Mon, 13 Jul 2015 10:32:35 GMT
Repository: syncope
Updated Branches:
  refs/heads/1_2_X 73d0975b0 -> 81a66445f
  refs/heads/master f45f2d9bf -> 4bd99d3b5


[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/1_2_X
Commit: f5df7f5cb3f5dfde39c90cbb85fe0971345a8728
Parents: 73d0975
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Mon Jul 13 11:57:49 2015 +0200
Committer: Francesco Chicchiriccò <ilgrosso@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);
     }


Mime
View raw message