r1030 - trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches
Author: kmorin Date: 2013-05-28 17:41:42 +0200 (Tue, 28 May 2013) New Revision: 1030 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1030 Log: fixes #2514 [CAPTURES] Erreur lors de l'?\195?\169l?\195?\169vation des poids quand les mensurations n'ont pas de poids et qu'il y a un poids de sous-?\195?\169chantillon Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java =================================================================== --- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java 2013-05-28 15:22:30 UTC (rev 1029) +++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/catches/TuttiWeightComputingService.java 2013-05-28 15:41:42 UTC (rev 1030) @@ -433,7 +433,9 @@ if (categoryWeight == null && rowWeight != null) { // throw new TuttiBusinessException(_("tutti.service.operations.computeWeights.error.incoherentRowWeightCategory")); - } else if (rowWeight != null && !rowWeight.equals(frequencyWeight)) { + } else if (rowWeight != null && frequencyWeight != null + && !rowWeight.equals(frequencyWeight)) { + throw new TuttiWeightComputingException( _("tutti.service.operations.computeWeights.error.species.incoherentRowWeightFrequency", species, batch.getSampleCategoryType().getLabel(), categoryValue, @@ -586,7 +588,9 @@ if (categoryWeight == null && rowWeight != null) { // throw new TuttiBusinessException(_("tutti.service.operations.computeWeights.error.incoherentRowWeightCategory")); - } else if (rowWeight != null && !rowWeight.equals(frequencyWeight)) { + } else if (rowWeight != null && frequencyWeight != null + && !rowWeight.equals(frequencyWeight)) { + throw new TuttiWeightComputingException( _("tutti.service.operations.computeWeights.error.benthos.incoherentRowWeightFrequency", species, batch.getSampleCategoryType().getLabel(), categoryValue,
participants (1)
-
kmorin@users.forge.codelutin.com