Martin Beták has posted comments on this change.

Change subject: webadmin: Fix NPE in VmModelBehaviorBase
......................................................................


Patch Set 3: (1 inline comment)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
Line 179:     }
Line 180: 
Line 181:     public TimeZoneType getTimeZoneType() {
Line 182:         VmOsType vmOsType = (VmOsType) 
getModel().getOSType().getSelectedItem();
Line 183:         return vmOsType == null ? TimeZoneType.GENERAL_TIMEZONE : 
TimeZoneType.getTimeZoneByOs(vmOsType);
Yes, this will solve the NPE, but if I may suggest that better place for this 
null check should actually be inside the TimeZoneType.getTimeZoneByOs method, 
to avoid similar omissions in the future. It makes sense for getTimeZoneByOs to 
return GENERAL_TIMEZONE if the osType is unspecified.
Line 184:     }
Line 185: 
Line 186:     protected void updateDomain()
Line 187:     {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba1b40aeb51613b7283202c33b737b04f1c5a599
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <oma...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Martin Beták <mbe...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-Reviewer: ofri masad <oma...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to