Tomas Jelinek has posted comments on this change.

Change subject: frontend: Console code refactor and cleanup
......................................................................


Patch Set 3:

(3 comments)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/VmConsolesImpl.java
Line 79:     public ConsoleProtocol getSelectedProcotol() {
Line 80:         return selectedProtocol;
Line 81:     }
Line 82: 
Line 83:     public <T extends ConsoleModel> T getConsoleModel(Class <T> type) {
If this took ConsoleProtocol as an argument, you would not need to have the 
whole modelTypeMapping nor the static initialization block to init it.

What do you think?
Line 84:         return (T) consoleModels.get(modelTypeMapping.get(type));
Line 85:     }
Line 86: 
Line 87:     public boolean canConnectToConsole() {


Line 105:         }
Line 106: 
Line 107:         for (ConsoleProtocol protocol : allProtocols) {
Line 108:             if (canSelectProtocol(protocol)) {
Line 109:                 selectProtocol(protocol);
maybe you miss the "break;" ?
Line 110:             }
Line 111:         }
Line 112:     }
Line 113: 


Line 145:         }
Line 146: 
Line 147:         // if display types changed, we'd like to update the default 
selected protocol as the old one may be invalid
Line 148:         if (newVm.getDisplayType() != oldDisplayType
Line 149:                 || newVm.getDefaultDisplayType() != 
oldDefaultDisplayType) {
also when the OS changed
Line 150:             setDefaultSelectedProtocol();
Line 151:         }
Line 152:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6d7cb5e457410e0e76a12f6602b44132cb913c9
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to