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 <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Frank Kobzik <[email protected]>
Gerrit-Reviewer: Libor Spevak <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches