Author: jleroux
Date: Thu Jul 17 10:09:35 2014
New Revision: 1611311
URL:
http://svn.apache.org/r1611311Log:
Check properties values
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=1611311&r1=1611310&r2=1611311&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 10:09:35 2014
@@ -239,12 +239,20 @@ public class JavaMailContainer implement
int portProps = 0;
String portStr = props.getProperty("mail." + protocol + ".port");
if (!UtilValidate.isEmpty(portStr)) {
- portProps = Integer.valueOf(portStr);
+ try {
+ portProps = Integer.valueOf(portStr);
+ } catch (NumberFormatException e) {
+ Debug.logError("The port given in property mail." + protocol + ".port is wrong, please check", module);
+ }
}
if (portProps == 0) {
portStr = props.getProperty("mail.port");
if (!UtilValidate.isEmpty(portStr)) {
- portProps = Integer.valueOf(props.getProperty("mail.port"));
+ try {
+ portProps = Integer.valueOf(props.getProperty("mail.port"));
+ } catch (NumberFormatException e) {
+ Debug.logError("The port given in property mail.port is wrong, please check", module);
+ }
}
}
// override the port if have found one.