Itamar Heim has posted comments on this change.

Change subject: core : implementing AddExternalEventCommand ...
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddExternalEventCommand.java
Line 25: 
Line 26:     @Override
Line 27:     protected boolean canDoAction() {
Line 28:         boolean result=true;
Line 29:         if (getParameters().getEvent() == null || 
getParameters().getEvent().equals(OVIRT)){
ok, all is clear (my comment on remove as well).
so last question i had on this one is why getEvent.equals(OVIRT).
(i.e., i'd expect something like getEvent.Origin...)
also, you should be cases insensitive in this check?
Line 30:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLEGAL_ORIGIN);
Line 31:             result = false;
Line 32:         }
Line 33:         if (!result) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveExternalEventCommand.java
Line 29:         if (event == null) {
Line 30:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_NOT_FOUND);
Line 31:             result = false;
Line 32:         }
Line 33:         if (event.getOrigin().equalsIgnoreCase(OVIRT)) {
here actually shouldn't be equalsIgnoreCase if you block equalsIgnoreCase on 
entry...
Line 34:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXTERNAL_EVENT_ILLEGAL_ORIGIN);
Line 35:             result = false;
Line 36:         }
Line 37:         if (!event.getseverity().equals(AuditLogSeverity.ALERT)) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3468a3dd99616e2436caee19b42b9cf448adc005
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to