src/main/java/org/wymiwyg/commons/util/URI.java
private void setPort(int p_port) throws MalformedURIException {
		if (p_port >= 0 && p_port <= 65535) {
			if (m_host == null) {
				throw new MalformedURIException("Port cannot be set when host is null!");
			}
		} else if (p_port != -1) {
			throw new MalformedURIException("Invalid port number!");
		}
		n_port = p_port;

	}
private void setPort(int p_port) throws MalformedURIException {
		if (p_port >= 0 && p_port <= 65535) {
			if (m_host == null) {
				throw new MalformedURIException("Port cannot be set when host is null!");
			}
		} else if (p_port != -1) {
			throw new MalformedURIException("Invalid port number!");
		}
		n_port = p_port;

	}
Set the port for this URI. -1 is used to indicate that the port is
not specified, otherwise valid port numbers are  between 0 and 65535.
If a valid port number is passed in and the host field is null,
an exception is thrown.

@param p_port the port number for this URI

@exception MalformedURIException if p_port is not -1 and not a
valid port number