From a23b205716ba2d0aa6e3089f24f19d2d9ab3bec4 Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Tue, 1 Mar 2011 09:24:11 +0000 Subject: [PATCH] LMS-2081 throw exception when well location coordinates are incorrect SVN: 20163 --- .../screening/shared/basic/dto/WellLocation.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellLocation.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellLocation.java index 42ed890e6a6..4f6a1470137 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellLocation.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/basic/dto/WellLocation.java @@ -202,8 +202,14 @@ public class WellLocation implements ISerializable public WellLocation(int row, int column) { - assert row > 0 : createNonPositiveErrorMsg("row", row); - assert column > 0 : createNonPositiveErrorMsg("column", column); + if (row <= 0) + { + throw new IllegalArgumentException(createNonPositiveErrorMsg("row", row)); + } + if (column <= 0) + { + throw new IllegalArgumentException(createNonPositiveErrorMsg("column", column)); + } this.row = row; this.column = column; } -- GitLab