details:   https://code.openbravo.com/erp/devel/pi/rev/0f00bec42b48
changeset: 31704:0f00bec42b48
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Fri Mar 17 14:18:39 2017 +0100
summary:   fixed bug 35561: logged NPE in audit trail creating tickets from POS

  When connection was obtained by ImportEntry a NPE was logged while setting
  audit trail. In this situation the proxied connection fails when invoking
  its equals method.

  In this case, equals was not necessary as what we really want to check is
  we're working with the same connection instance.

diffstat:

 src-core/src/org/openbravo/database/SessionInfo.java |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 38ad3df85019 -r 0f00bec42b48 
src-core/src/org/openbravo/database/SessionInfo.java
--- a/src-core/src/org/openbravo/database/SessionInfo.java      Fri Mar 17 
09:13:27 2017 +0100
+++ b/src-core/src/org/openbravo/database/SessionInfo.java      Fri Mar 17 
14:18:39 2017 +0100
@@ -218,7 +218,8 @@
       psInsert.setString(3, SessionInfo.getProcessType());
       psInsert.setString(4, SessionInfo.getProcessId());
       psInsert.executeUpdate();
-      if (conn.equals(sessionConnection.get())) {
+
+      if (conn == sessionConnection.get()) {
         // Handling only for the sqlc connection, as DAL should be 
automatically handled so that
         // this method is invoked only once.
         changedInfo.set(false);

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to