Martin Mucha has posted comments on this change.

Change subject: webadmin: refactor—overgrown constructor
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/32210/4/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/macpool/SharedMacPoolView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/macpool/SharedMacPoolView.java:

Line 33:             final ApplicationConstants constants,
Line 34:             final ApplicationResources resources) {
Line 35: 
Line 36:         SplitLayoutPanel rootPanel = createRootPanel();
Line 37:         macPoolTable = createMacPoolTable(sharedMacPoolModelProvider, 
eventBus, clientStorage, headerlessResources,
> Most of these arguments are used only in the first line of createMacPoolTab
that's a consequence of too big (not-that)SimpleActionTable and/or missing DI.

having one "create" method is better for me. But I'm not against creating 
"initMacPoolTable". Another possibility would be to turn that parameters into 
fields, which would make this code less procedural and more OO. 

Your preference for any of these two?
Line 38:                 tableResources, constants, resources);
Line 39: 
Line 40:         rootPanel.add(macPoolTable);
Line 41:         initWidget(rootPanel);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I05d1ec1064eb3ec4ce17f88a2d532cb76aa4f39d
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Martin Mucha <mmu...@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

Reply via email to