WW-1709 fixed nullpointer when scheme is null

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@508879 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Schneider
2007-02-18 06:32:02 +00:00
parent 129e4559ce
commit 7d8dfff8a1
@@ -103,10 +103,12 @@ public class UrlHelper {
link.append("://");
link.append(request.getServerName());
if ((scheme.equals("http") && (httpPort != DEFAULT_HTTP_PORT)) || (scheme.equals("https") && httpsPort != DEFAULT_HTTPS_PORT))
{
link.append(":");
link.append(scheme.equals("http") ? httpPort : httpsPort);
if (scheme != null) {
if ((scheme.equals("http") && (httpPort != DEFAULT_HTTP_PORT)) || (scheme.equals("https") && httpsPort != DEFAULT_HTTPS_PORT))
{
link.append(":");
link.append(scheme.equals("http") ? httpPort : httpsPort);
}
}
}
else if (