Alon Bar-Lev has posted comments on this change. Change subject: core: introduce context pattern ......................................................................
Patch Set 24: (2 comments) http://gerrit.ovirt.org/#/c/28829/24/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/context/CommandContext.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/context/CommandContext.java: Line 14: Line 15: /** Line 16: * Holds common attributes to all engine flows Line 17: */ Line 18: private EngineContext engineContext; again... final here. Line 19: Line 20: /** Line 21: * The Lock in the command context is used by the parent command to pass to the child command locks the child needs Line 22: * to acquire. Line 97: public Object clone() throws CloneNotSupportedException { Line 98: super.clone(); Line 99: CommandContext ctx = new CommandContext(); Line 100: ctx.setFromContext(this); Line 101: return this.duplicate(); clone should not use duplicate... duplicate should be an alias of clone. hmmm... you created infinite loop? clone->duplicate->clone? this entire logic is incorrect... should be, something line: CommandContext cloned = (CommandContext)super.clone(); cloned.setFromContext(this); return cloned; Line 102: Line 103: } Line 104: Line 105: private void setFromContext(CommandContext context) { -- To view, visit http://gerrit.ovirt.org/28829 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I310f5f77fff78b3232ee77fe63791425fd521516 Gerrit-PatchSet: 24 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@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