Vojtech Szocs has posted comments on this change.
Change subject: userportal,webadmin: remove double slash in link
......................................................................
Patch Set 2:
(1 comment)
....................................................
File
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/utils/BaseContextPathData.java
Line 18: return this.value;
Line 19: }-*/;
Line 20:
Line 21: public String getRelativePath() {
Line 22: String path = getPath();
> If I understand correctly, this is run by gwt... right?
This code is subject to GWT compilation and executes as JavaScript in the
browser.
> Does it support File::getCanonicalPath()? if so let's use it...
Not possible, simply because JavaScript doesn't have direct access to host
filesystem. GWT emulates small parts of standard Java library (JRE) but
java.io.File isn't supported.
More details here: http://www.gwtproject.org/doc/latest/RefJreEmulation.html
> The problem is the fact that the base context path starts with / in the host
> page. Then SOME of the code that uses this assumes that this does not start
> with a / and some does.
Maybe we should refactor code to ensure consistent consumption of
baseContextPath value (in a separate patch), so we wouldn't need this kind of
logic.
Line 23: if (path.startsWith("/")) { //$NON-NLS-1$
Line 24: path = path.substring(1);
Line 25: }
Line 26: return path;
--
To view, visit http://gerrit.ovirt.org/20931
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica1ee3cce0c98dffe781b7d0e9ec5c2d667b4acd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[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