Lior Vernia has posted comments on this change.

Change subject: webadmin: Added bond name validation
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/validation/BondNameValidation.java
Line 13:     }
Line 14: 
Line 15:     @Override
Line 16:     public ValidationResult Validate(Object bond) {
Line 17:         return super.Validate(((Bond) bond).getName());
I think it's good that it's unsafe. There will only be a casting exception here 
if a developer misused the BondNameValidation class, in which case an exception 
would be good enough to inform them that they've made an error. It is 
definitely not something that should ever be encountered by an end-user, 
therefore setting a ValidationResult would not be a good solution. One thing 
that can be done is make the exception more verbose, but I don't think that's 
necessary.
Line 18:     }
Line 19: 


--
To view, visit http://gerrit.ovirt.org/12532
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8f5ea2b582f3117817ef72f7d3350977a124681f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to