From: mka Date: Mon, 11 Mar 2013 11:23:25 +0000 (+0000) Subject: small correction of the compare algorithm. X-Git-Tag: Root_Delivery2_2013_04_22~112 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=14463d1eeb0617dedf444d143a9b9c9d0d5111e2;p=tools%2Fsiman.git small correction of the compare algorithm. --- diff --git a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java index 4749a98..7a48fb6 100644 --- a/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/StudyServiceImpl.java @@ -45,12 +45,12 @@ import org.splat.dal.bo.som.ProgressState; import org.splat.dal.bo.som.Publication; import org.splat.dal.bo.som.SimulationContext; import org.splat.dal.bo.som.Study; +import org.splat.dal.bo.som.Study.Properties; import org.splat.dal.bo.som.ValidationCycle; +import org.splat.dal.bo.som.ValidationCycle.Actor; import org.splat.dal.bo.som.ValidationCycleRelation; import org.splat.dal.bo.som.ValidationStep; import org.splat.dal.bo.som.Visibility; -import org.splat.dal.bo.som.Study.Properties; -import org.splat.dal.bo.som.ValidationCycle.Actor; import org.splat.dal.dao.som.DescriptionAttributeDAO; import org.splat.dal.dao.som.DocumentDAO; import org.splat.dal.dao.som.IDBuilderDAO; @@ -1140,7 +1140,7 @@ public class StudyServiceImpl implements StudyService { * @see org.splat.service.StudyService#compare(java.util.List) */ @Override - public String compare (final List docsList, final String userName) throws IncompatibleDataException{ + public String compare (final List docsList, final String userName) throws IncompatibleDataException { String axis1Name = ""; String axis2Name = ""; @@ -1167,6 +1167,10 @@ public class StudyServiceImpl implements StudyService { //get the name of the axis. if (input.hasNext()) { String[] tokens = input.nextLine().split(","); + + if (tokens.length < 2) + throw new IncompatibleDataException(MessageKeyEnum.IDT_000001.toString()); + if ("".equals(axis1Name)) { axis1Name = tokens[0]; } else if (!axis1Name.equals(tokens[0])) {