/hg/release/icedtea-web-1.6: 4 new changesets
Stefan Ring
stefan at complang.tuwien.ac.at
Tue Sep 8 10:01:27 UTC 2015
> + private static String stripFileImp(URL documentbase) {
> + try {
> + String normlaized = UrlUtils.normalizeUrlAndStripParams(documentbase).toExternalForm().trim();
> + if (normlaized.endsWith("/") || normlaized.endsWith("\\")) {
> + return normlaized;
> + }
> + URL middleway = new URL(normlaized);
> + String file = middleway.getFile();
> + int i = Math.max(file.lastIndexOf('/'), file.lastIndexOf('\\'));
> + if (i<0){
> + return normlaized;
> + }
> + String parent = file.substring(0, i+1);
> + String stripped = normlaized.replace(file, parent);
> + return stripped;
> + } catch (Exception ex) {
> + OutputController.getLogger().log(ex);
> + return documentbase.toExternalForm();
> + }
> +
> + }
> +
> + private static String ensureSlashTail(String s) {
Hmm, "normlaized".
More information about the distro-pkg-dev
mailing list