From 6ff666e30c9671cbcb971ffa7c06048ef0b2f886 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 11 Aug 2015 12:11:43 -0500 Subject: [PATCH] IDEMPIERE-2756 Background threads losing context when user log out - fix validation --- org.adempiere.base/src/org/compiere/model/PO.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 95e3ed0e14..4492e9a891 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -425,8 +425,6 @@ public abstract class PO */ public Properties getCtx() { - if (p_ctx.size() == 0 && Env.getCtx().size() > 0) - p_ctx = Env.getCtx(); return p_ctx; } // getCtx @@ -4676,7 +4674,7 @@ public abstract class PO } private void checkValidContext() { - if (getCtx().size() == 0) + if (getCtx().isEmpty() && getCtx().getProperty("#AD_Client_ID") == null) throw new AdempiereException("Context lost"); }