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();
OK, I just realized we can't do "//" -> "/" replacement here, because "path"
will have just one leading slash (always, IIUC). As Alex wrote, the problem is
concatenation done in code that uses this method.
I think we can assume (and maybe also document) that "baseContextPath" always
starts with leading slash by definition. (If we really wanted, we could even
make "getPath" private and add another public method that first makes assert,
then returns its value.)
So current "getRelativePath" method can just do un-conditional "substring(1)"
stuff.
Another thing is to refactor code that needs "getRelativePath" method, i.e. see
if it just can't use the one with 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