Moti Asayag has posted comments on this change.

Change subject: core: fix NPE problems
......................................................................


Patch Set 10: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 1948:      */
Line 1949:     public Map<String, String> getJobMessageProperties() {
Line 1950:         jobProperties = new HashMap<String, String>();
Line 1951:         List<PermissionSubject> subjects = 
getPermissionCheckSubjects();
Line 1952:         if (jobProperties == null && subjects != null) {
jobProperties == null will always be true since you initialize it on 1950 (2 
lines above).

As for the subjects, I don't think there is an assumption somewhere is the 
system that the permission subject entities can be null. At most it can be an 
empty list.
Line 1953:             if (!subjects.isEmpty()) {
Line 1954:                 VdcObjectType entityType;
Line 1955:                 Guid entityId;
Line 1956:                 String value;


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java
Line 289:             } catch (Exception e) {
Line 290:                 log.error(e);
Line 291:             }
Line 292:         }
Line 293:         step.setExternal(isExternal);
this is a candidate for NPE, step might be null and for sure will be if the 
command is marked as not-monitored.

Please handle it cautiously.
Line 294:         return step;
Line 295:     }
Line 296: 
Line 297:     /**


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I622e2a92b0433edbbf45fc4ed4f352cb2d09872d
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to