diff --git a/org.adempiere.base/src/org/compiere/db/CConnection.java b/org.adempiere.base/src/org/compiere/db/CConnection.java index 6f77bc3a57..c74ec35c95 100644 --- a/org.adempiere.base/src/org/compiere/db/CConnection.java +++ b/org.adempiere.base/src/org/compiere/db/CConnection.java @@ -871,8 +871,9 @@ public class CConnection implements Serializable, Cloneable // System.out.println ("CConnection.setDataSource - " + m_ds + " - Client=" + Ini.isClient()); if (m_ds == null && Ini.isClient()) { - if (getDatabase() != null) // no db selected - m_ds = getDatabase().getDataSource(this); + AdempiereDatabase getDB = getDatabase(); + if (getDB != null) // no db selected + m_ds = getDB.getDataSource(this); // System.out.println ("CConnection.setDataSource - " + m_ds); } return m_ds != null; diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index 726245d2bb..2200e75a67 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -494,9 +494,9 @@ public class MInvoiceLine extends X_C_InvoiceLine + taxThisAmt + " Standard Tax Amt: " + taxStdAmt + " Line Net Amt: " + bd); } } - - if (bd.scale() > getPrecision()) - bd = bd.setScale(getPrecision(), BigDecimal.ROUND_HALF_UP); + int precision = getPrecision(); + if (bd.scale() > precision) + bd = bd.setScale(precision, BigDecimal.ROUND_HALF_UP); super.setLineNetAmt (bd); } // setLineNetAmt /** diff --git a/org.adempiere.base/src/org/compiere/model/MOrderLine.java b/org.adempiere.base/src/org/compiere/model/MOrderLine.java index ed492b9eba..334ea9b35a 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrderLine.java +++ b/org.adempiere.base/src/org/compiere/model/MOrderLine.java @@ -404,9 +404,9 @@ public class MOrderLine extends X_C_OrderLine } } - - if (bd.scale() > getPrecision()) - bd = bd.setScale(getPrecision(), BigDecimal.ROUND_HALF_UP); + int precision = getPrecision(); + if (bd.scale() > precision) + bd = bd.setScale(precision, BigDecimal.ROUND_HALF_UP); super.setLineNetAmt (bd); } // setLineNetAmt diff --git a/org.adempiere.base/src/org/compiere/model/MStore.java b/org.adempiere.base/src/org/compiere/model/MStore.java index d432a6ed7d..500ebb7813 100644 --- a/org.adempiere.base/src/org/compiere/model/MStore.java +++ b/org.adempiere.base/src/org/compiere/model/MStore.java @@ -400,7 +400,7 @@ public class MStore extends X_W_Store try { String msg = email.send(); - if (EMail.SENT_OK.equals (email.send ())) + if (EMail.SENT_OK.equals (msg)) { log.info("Sent EMail " + subject + " to " + to); return true; @@ -437,7 +437,7 @@ public class MStore extends X_W_Store try { String msg = email.send(); - if (EMail.SENT_OK.equals (email.send ())) + if (EMail.SENT_OK.equals (msg)) { log.info("Sent Test EMail to " + getWStoreEMail()); return "OK"; diff --git a/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java b/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java index d2eb8fed35..49ccbebce5 100644 --- a/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java +++ b/org.adempiere.base/src/org/compiere/model/ScheduleUtil.java @@ -186,8 +186,9 @@ public class ScheduleUtil ResultSet rs = pstmt.executeQuery(); while (rs.next()) { - ma = new MAssignmentSlot (TimeUtil.getDay(rs.getTimestamp(2)), - TimeUtil.getNextDay(rs.getTimestamp(2)), // user entered date need to convert to not including end time + Timestamp date = rs.getTimestamp(2); + ma = new MAssignmentSlot (TimeUtil.getDay(date), + TimeUtil.getNextDay(date), // user entered date need to convert to not including end time Msg.getMsg(m_ctx, "NonBusinessDay"), rs.getString(1), MAssignmentSlot.STATUS_NonBusinessDay); log.finer("- NonBusinessDay " + ma); diff --git a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java index 749c1bbdf5..353b447ba2 100644 --- a/org.adempiere.install/src/org/compiere/install/ConfigurationData.java +++ b/org.adempiere.install/src/org/compiere/install/ConfigurationData.java @@ -614,9 +614,10 @@ public class ConfigurationData // try { + String admail = adminEMail.toString(); EMail email = new EMail (new Properties(), mailServer.getHostName (), - adminEMail.toString (), adminEMail.toString(), + admail, admail, "Adempiere Server Setup Test", "Test: " + getProperties()); email.createAuthenticator (mailUser, mailPassword); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 08e6f68247..7767323016 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -1179,8 +1179,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (!detailTab) { - logger.info(e.getMessage()); String dbInfo = e.getMessage(); + logger.info(dbInfo); if (adTabbox.getSelectedGridTab() != null && adTabbox.getSelectedGridTab().isQueryActive()) dbInfo = "[ " + dbInfo + " ]"; breadCrumb.setStatusDB(dbInfo, e); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java index 78bd4c70e3..24f0bedea4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSQLProcess.java @@ -234,8 +234,9 @@ public class WSQLProcess extends ADForm implements EventListener } catch (SQLException e) { - log.log(Level.SEVERE, "process statement: " + sql + " - " + e.toString()); - result.append("===> ").append(e.toString()); + String exception = e.toString(); + log.log(Level.SEVERE, "process statement: " + sql + " - " + exception); + result.append("===> ").append(exception); } // Clean up