Roy Golan has posted comments on this change.

Change subject: core: validator - include range as constraint message
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.ovirt.org/#/c/39384/4/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/validation/ConfiguredRangeValidator.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/validation/ConfiguredRangeValidator.java:

Line 30:     @Override
Line 31:     public boolean isValid(Integer value, ConstraintValidatorContext 
context) {
Line 32:         boolean result = value == null ? true : value >= min && value 
<= max;
Line 33:         if (!result) {
Line 34:             context.buildConstraintViolationWithTemplate(rangeMessage);
> since the rangeMessage is relevant only in case of a failure, it could be l
why? you don't need to re-evaluate every time. btw the validator will reuse 
this instance for for further evaluations.
Line 35:         }
Line 36:         return result;
Line 37:     }
Line 38: 


-- 
To view, visit https://gerrit.ovirt.org/39384
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icc8813288958fdc9a66548c3a013a928d370e28c
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tomer Saban <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to