Moti Asayag has posted comments on this change. Change subject: core: Introduce BusinessEntityMap ......................................................................
Patch Set 13: (1 comment) http://gerrit.ovirt.org/#/c/33329/13/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BusinessEntityMap.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BusinessEntityMap.java: Line 19: entitiesByName = new HashMap<String, E>(); Line 20: entitiesById = new HashMap<Guid, E>(); Line 21: Line 22: for (E e : entities) { Line 23: if (e.getName() != null) { > Please use Entites.entitiesByName and Entites.businessEntitiesById to avoid I can't. Here there is a good chance that either the name or the id are null. it will produce NPE if i use Entites.entitiesByName and Entites.businessEntitiesById Line 24: entitiesByName.put(e.getName(), e); Line 25: } Line 26: Line 27: if (e.getId() != null) { -- To view, visit http://gerrit.ovirt.org/33329 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4540f813f8a787a38ba3e692b6ddd3fcc6be536a Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches