Author: jleroux
Date: Mon Feb 27 13:19:17 2017 New Revision: 1784560 URL: http://svn.apache.org/viewvc?rev=1784560&view=rev Log: No functional change, cleaner code Modified: ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java ofbiz/branches/release15.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java Modified: ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java?rev=1784560&r1=1784559&r2=1784560&view=diff ============================================================================== --- ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java (original) +++ ofbiz/branches/release14.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java Mon Feb 27 13:19:17 2017 @@ -108,11 +108,12 @@ public final class WebSiteProperties { httpPort = httpPortValue.toString(); if (!dontAdd) { Integer httpsPortValue = Integer.valueOf(httpsPort); - if (! httpsPort.isEmpty()) - httpsPortValue += Start.getInstance().getConfig().portOffset; + if (!httpsPort.isEmpty()) { + httpsPortValue += Start.getInstance().getConfig().portOffset; + } httpsPort = httpsPortValue.toString(); } - } + } webSiteProps = new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, enableHttps); request.setAttribute("_WEBSITE_PROPS_", webSiteProps); @@ -145,7 +146,7 @@ public final class WebSiteProperties { Integer httpsPortValue = Integer.valueOf(httpsPort); httpsPortValue += Start.getInstance().getConfig().portOffset; // Here unlike above we trust the user and don't rely on the request, no dontAdd. httpsPort = httpsPortValue.toString(); - } + } return new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, enableHttps); } Modified: ofbiz/branches/release15.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java?rev=1784560&r1=1784559&r2=1784560&view=diff ============================================================================== --- ofbiz/branches/release15.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java (original) +++ ofbiz/branches/release15.12/framework/webapp/src/org/ofbiz/webapp/website/WebSiteProperties.java Mon Feb 27 13:19:17 2017 @@ -108,11 +108,12 @@ public final class WebSiteProperties { httpPort = httpPortValue.toString(); if (!dontAdd) { Integer httpsPortValue = Integer.valueOf(httpsPort); - if (! httpsPort.isEmpty()) - httpsPortValue += Start.getInstance().getConfig().portOffset; + if (!httpsPort.isEmpty()) { + httpsPortValue += Start.getInstance().getConfig().portOffset; + } httpsPort = httpsPortValue.toString(); } - } + } webSiteProps = new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, enableHttps); request.setAttribute("_WEBSITE_PROPS_", webSiteProps); @@ -145,7 +146,7 @@ public final class WebSiteProperties { Integer httpsPortValue = Integer.valueOf(httpsPort); httpsPortValue += Start.getInstance().getConfig().portOffset; // Here unlike above we trust the user and don't rely on the request, no dontAdd. httpsPort = httpsPortValue.toString(); - } + } return new WebSiteProperties(httpPort, httpHost, httpsPort, httpsHost, enableHttps); } |
Free forum by Nabble | Edit this page |