Alexander Wels 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();
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. This code is called mostly like this:

FrontendUtils.getBaseURL() + getPath() + rest of path.

FrontendUtils.getBaseURL() always appends a / at the end. so if getPath() is 
called you end up with double //. However not ALL the code calling getPath has 
this assumption, so I had to split it out into two calls, one with and one 
without the leading slash.
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

Reply via email to