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());
It's not always best practice to check for null. If you know that a value can't 
in a logical flow be null (e.g. it's a collection you retrieve from the 
database, and your policy had been to never put null collections in the 
database but rather empty ones), then you shouldn't check for it. And if you 
were wrong, then you would get an exception and discover that your project 
didn't maintain logical flow, and find out where that logic was broken.
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 <lver...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to