Return-Path: X-Original-To: apmail-syncope-commits-archive@www.apache.org Delivered-To: apmail-syncope-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B40C18E9B for ; Mon, 13 Jul 2015 10:32:36 +0000 (UTC) Received: (qmail 77405 invoked by uid 500); 13 Jul 2015 10:32:36 -0000 Delivered-To: apmail-syncope-commits-archive@syncope.apache.org Received: (qmail 77373 invoked by uid 500); 13 Jul 2015 10:32:36 -0000 Mailing-List: contact commits-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list commits@syncope.apache.org Received: (qmail 77363 invoked by uid 99); 13 Jul 2015 10:32:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2015 10:32:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D8B28DFFA9; Mon, 13 Jul 2015 10:32:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: ilgrosso@apache.org To: commits@syncope.apache.org Date: Mon, 13 Jul 2015 10:32:35 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/5] syncope git commit: [SYNCOPE-682] #resolve 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ò Authored: Mon Jul 13 11:57:49 2015 +0200 Committer: Francesco Chicchiriccò 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 resources; + private Set resources = new HashSet(); public AccountPolicy() { this(false); - this.resources = new HashSet(); } 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); }