src/main/java/org/wymiwyg/commons/util/URI.java
private void appendPath(String p_addToPath) throws MalformedURIException {
		if (p_addToPath == null || p_addToPath.length() == 0) {
			return;
		}

		if (!isURIString(p_addToPath)) {
			throw new MalformedURIException("Path contains invalid character!");
		}

		if (m_path == null || m_path.length() == 0) {
			if (p_addToPath.startsWith("/")) {
				m_path = p_addToPath;
			} else {
				m_path = "/" + p_addToPath;
			}
		} else if (m_path.endsWith("/")) {
			if (p_addToPath.startsWith("/")) {
				m_path = m_path.concat(p_addToPath.substring(1));
			} else {
				m_path = m_path.concat(p_addToPath);
			}
		} else {
			if (p_addToPath.startsWith("/")) {
				m_path = m_path.concat(p_addToPath);
			} else {
				m_path = m_path.concat("/" + p_addToPath);
			}
		}
	}
private void appendPath(String p_addToPath) throws MalformedURIException {
		if (p_addToPath == null || p_addToPath.length() == 0) {
			return;
		}

		if (!isURIString(p_addToPath)) {
			throw new MalformedURIException("Path contains invalid character!");
		}

		if (m_path == null || m_path.length() == 0) {
			if (p_addToPath.startsWith("/")) {
				m_path = p_addToPath;
			} else {
				m_path = "/" + p_addToPath;
			}
		} else if (m_path.endsWith("/")) {
			if (p_addToPath.startsWith("/")) {
				m_path = m_path.concat(p_addToPath.substring(1));
			} else {
				m_path = m_path.concat(p_addToPath);
			}
		} else {
			if (p_addToPath.startsWith("/")) {
				m_path = m_path.concat(p_addToPath);
			} else {
				m_path = m_path.concat("/" + p_addToPath);
			}
		}
	}
private void appendPath ( String p_addToPath ) throws MalformedURIException { if ( p_addToPath == null || p_addToPath . length ( ) == 0 ) { return ; } if ( ! isURIString ( p_addToPath ) ) { throw new MalformedURIException ( "Path contains invalid character!" ) ; } if ( m_path == null || m_path . length ( ) == 0 ) { if ( p_addToPath . startsWith ( "/" ) ) { m_path = p_addToPath ; } else { m_path = "/" + p_addToPath ; } } else if ( m_path . endsWith ( "/" ) ) { if ( p_addToPath . startsWith ( "/" ) ) { m_path = m_path . concat ( p_addToPath . substring ( 1 ) ) ; } else { m_path = m_path . concat ( p_addToPath ) ; } } else { if ( p_addToPath . startsWith ( "/" ) ) { m_path = m_path . concat ( p_addToPath ) ; } else { m_path = m_path . concat ( "/" + p_addToPath ) ; } } }
Append to the end of the path of this URI. If the current path does
not end in a slash and the path to be appended does not begin with
a slash, a slash will be appended to the current path before the
new segment is added. Also, if the current path ends in a slash
and the new segment begins with a slash, the extra slash will be
removed before the new segment is appended.

@param p_addToPath the new segment to be added to the current path

@exception MalformedURIException if p_addToPath contains syntax
errors
Append to the end of the path of this URI . If the current path does not end in a slash and the path to be appended does not begin with a slash a slash will be appended to the current path before the new segment is added . Also if the current path ends in a slash and the new segment begins with a slash the extra slash will be removed before the new segment is appended .