Author: jleroux
Date: Thu Jul 17 04:51:37 2014
New Revision: 1611246
URL:
http://svn.apache.org/r1611246Log:
Format a bit more BJ's code
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java?rev=1611246&r1=1611245&r2=1611246&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java Thu Jul 17 04:51:37 2014
@@ -236,20 +236,20 @@ public class JavaMailContainer implement
}
// check the port
- int port1 = 0;
- String strport = props.getProperty("mail." + protocol + ".port");
- if (!UtilValidate.isEmpty(strport)) {
- port1 = Integer.valueOf(strport).intValue();
- }
- if (port1==0) {
- strport = props.getProperty("mail.port");
- if (!UtilValidate.isEmpty(strport)) {
- port1 = Integer.valueOf(props.getProperty("mail.port")).intValue();
+ int portProps = 0;
+ String portStr = props.getProperty("mail." + protocol + ".port");
+ if (!UtilValidate.isEmpty(portStr)) {
+ portProps = Integer.valueOf(portStr);
+ }
+ if (portProps == 0) {
+ portStr = props.getProperty("mail.port");
+ if (!UtilValidate.isEmpty(portStr)) {
+ portProps = Integer.valueOf(props.getProperty("mail.port"));
}
}
// override the port if have found one.
- if (port1!=0) {
- port = port1;
+ if (portProps != 0) {
+ port = portProps;
}
if (Debug.verboseOn()) Debug.logVerbose("Update URL - " + protocol + "://" + userName + "@" + host + ":" + port + "!" + password + ";" + file, module);