Arik Hadas has posted comments on this change.

Change subject: engine: Fixes in non plugin console invocation
......................................................................


Patch Set 2: Looks good to me, but someone else must approve

(4 inline comments)

it looks good, just few suggestions to make the 'cleanup' part of this patch 
more complete

....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/SpicePluginImpl.java
Line 197:         return false;
Line 198:     }
Line 199: 
Line 200:     private boolean isLinuxAndFirefox() {
Line 201:         return (cat.os.equalsIgnoreCase("Linux")) //$NON-NLS-1$
how about using OsType.Linux? we can avoid using the NON-NLS comment by using 
OsType.Linux.name() or add a method in OsType enum that return the os-type 
according to a given string which can be nicer
Line 202:                 && 
(cat.browser.equalsIgnoreCase("Firefox"));//$NON-NLS-1$
Line 203:     }
Line 204: 
Line 205:     private boolean isWindowsAndIE() {


Line 198:     }
Line 199: 
Line 200:     private boolean isLinuxAndFirefox() {
Line 201:         return (cat.os.equalsIgnoreCase("Linux")) //$NON-NLS-1$
Line 202:                 && 
(cat.browser.equalsIgnoreCase("Firefox"));//$NON-NLS-1$
how about adding an enum 'Browser' like OsType instead using explicit strings 
here and in line 207?
Line 203:     }
Line 204: 
Line 205:     private boolean isWindowsAndIE() {
Line 206:         return (cat.os.equalsIgnoreCase("Windows")) //$NON-NLS-1$


Line 202:                 && 
(cat.browser.equalsIgnoreCase("Firefox"));//$NON-NLS-1$
Line 203:     }
Line 204: 
Line 205:     private boolean isWindowsAndIE() {
Line 206:         return (cat.os.equalsIgnoreCase("Windows")) //$NON-NLS-1$
same here - you can use OsType.Windows?
Line 207:                 && (cat.browser.equalsIgnoreCase("Explorer")); 
//$NON-NLS-1$
Line 208:     }
Line 209: 
Line 210:     private native boolean detectXpiPlugin() /*-{


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/SpiceConsoleModel.java
Line 116:                 if (pluginSpice.detectBrowserPlugin()) {
Line 117:                     setspice(pluginSpice);
Line 118:                 } else {
Line 119:                     setspice((ISpice) 
TypeResolver.getInstance().Resolve(ISpiceNative.class));
Line 120:                 }
suggestion - replace it with ternary-if: 
setspice(pluginSpice.detectBrowserPlugin() ? ...) , it will be shorter and more 
readable
Line 121:             break;
Line 122:         }
Line 123:     }
Line 124: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7fe6fbf274a9ac215e8f6593cc000f778a431928
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Libor Spevak <lspe...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to