mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
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:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user