Java URL Sanitize sanitizeCollabNetUrl(String url)

Here you can find the source of sanitizeCollabNetUrl(String url)

Description

Sanitizes a CollabNet url and make it appropriate to be used by this plugin.

License

Open Source License

Parameter

Parameter Description
url original url

Return

sanitized collabnet url

Declaration

public static String sanitizeCollabNetUrl(String url) 

Method Source Code

//package com.java2s;

public class Main {
    /**/*from  w ww . ja  v a  2  s  .co m*/
     * Sanitizes a CollabNet url and make it appropriate to be used by this plugin.
     * @param url original url
     * @return sanitized collabnet url
     */
    public static String sanitizeCollabNetUrl(String url) {
        // strip the trailing "/" from the collabnet url, as this causes browser to log off session (artf51846)
        if (url != null && url.endsWith("/")) {
            url = url.substring(0, url.length() - 1);
        }
        return url;
    }
}

Related

  1. sanitizeDefaultPort(String url)
  2. sanitizeForNextUrl(String url)
  3. sanitizeUri(String uri)
  4. sanitizeUri(String uri)