Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: bd44b943 by Tony Chemit at 2023-03-09T19:06:54+01:00 Coordonnées - Problème sur les arrondis de nombres décimaux - See #2636 - - - - - 6590eb16 by Tony Chemit at 2023-03-09T19:07:00+01:00 Bornes validation - Problème sur les arrondis de nombres décimaux - See #2636 - - - - - 2 changed files: - core/api/dto-validation/src/main/java/fr/ird/observe/dto/validation/validators/AbstractSpeciesFieldDtoValidator.java - toolkit/api/src/main/java/fr/ird/observe/dto/I18nDecoratorHelper.java Changes: ===================================== core/api/dto-validation/src/main/java/fr/ird/observe/dto/validation/validators/AbstractSpeciesFieldDtoValidator.java ===================================== @@ -193,11 +193,11 @@ public abstract class AbstractSpeciesFieldDtoValidator extends FieldValidatorSup } public Float getMin() { - return computedBound == null ? null : Numbers.roundThreeDigits(computedBound.getMin()); + return computedBound == null ? null : Numbers.roundFourDigits(computedBound.getMin()); } public Float getMax() { - return computedBound == null ? null : Numbers.roundThreeDigits(computedBound.getMax()); + return computedBound == null ? null : Numbers.roundFourDigits(computedBound.getMax()); } private Boolean getValidationLengthWeightEnable(Object object) throws ValidationException { ===================================== toolkit/api/src/main/java/fr/ird/observe/dto/I18nDecoratorHelper.java ===================================== @@ -185,7 +185,7 @@ public abstract class I18nDecoratorHelper extends BeanPropertyI18nKeyProducerPro public static String fillCoordinateComponent(int integerPartDigit, Float component) { boolean withSign = component < 0; - String round = String.valueOf(Numbers.roundThreeDigits(component)); + String round = String.valueOf(Numbers.roundFourDigits(component)); int index = round.indexOf("."); return (withSign ? "-" : " ") + Strings.leftPad(round.substring(0, index).replace("-", ""), integerPartDigit, "0") View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/770640e3830f33d48c7b0d99b... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/770640e3830f33d48c7b0d99b... You're receiving this email because of your account on gitlab.com.