From dcosse@users.chorem.org Mon Jul 28 17:37:39 2014
From: dcosse@users.chorem.org
To: lima-commits@list.chorem.org
Subject: [Lima-commits] r3870 -
	trunk/lima-business/src/main/java/org/chorem/lima/business/ejb
Date: Mon, 28 Jul 2014 17:37:39 +0200
Message-ID: <20140728153739.9FBF71810C3@goh.codelutin.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0211557280422851317=="

--===============0211557280422851317==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Author: dcosse
Date: 2014-07-28 17:37:39 +0200 (Mon, 28 Jul 2014)
New Revision: 3870

Url: http://forge.chorem.org/projects/lima/repository/revisions/3870

Log:
refs #1032 gestion du cas ou il le master n'a pas de parents


Modified:
   trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialSt=
atementServiceImpl.java

Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/Fina=
ncialStatementServiceImpl.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialS=
tatementServiceImpl.java	2014-07-28 15:33:53 UTC (rev 3869)
+++ trunk/lima-business/src/main/java/org/chorem/lima/business/ejb/FinancialS=
tatementServiceImpl.java	2014-07-28 15:37:39 UTC (rev 3870)
@@ -26,6 +26,7 @@
 package org.chorem.lima.business.ejb;
=20
 import com.google.common.base.Function;
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.logging.Log;
@@ -92,6 +93,9 @@
=20
             // valid that there are no duplicated financial statement.
             Collection<FinancialStatement> subFinancialStatements =3D master=
financialStatementUpdate.getSubFinancialStatements();
+            if (subFinancialStatements =3D=3D null) {
+                subFinancialStatements =3D Lists.newArrayList();
+            }
             Map indexedSubFinancialStatements =3D Maps.uniqueIndex(subFinanc=
ialStatements, GET_LABEL);
             if (indexedSubFinancialStatements.get(financialStatement.getLabe=
l()) !=3D null){
                 throw new AlreadyExistFinancialTransaction(financialStatemen=
t.getLabel(), masterfinancialStatementUpdate.getLabel());


--===============0211557280422851317==--


