Arik Hadas 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());
you're right when you're referring to internal code - there's a paradigm of not 
doing "defensive code" in which you don't check for null, not check for run 
time type validations etc. but when it comes to API - whether API of package or 
class, it's considered as a "code smell" not to protect yourself from invalid 
input. since this validators can be used by other packages/classes in the 
project, it's error-prone to relay on cast-cast exception (a runtime exception 
which is converted in GWT to umberlla cast or something like that which makes 
it harder to debug). but if alona & derez can live with that, I can live with 
that also..
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: Daniel Erez <[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