From 8609a6a53b6c0e7e29f76b3dfe04c7cc9db8a6be Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 14 Jan 2013 18:04:00 -0800 Subject: [PATCH] IDEMPIERE-553 Can not set Nullable Combobox fields to Null after setting them to a non-null value --- org.adempiere.base/src/org/compiere/model/PO.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 58e9660c82..12d56add58 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -594,15 +594,11 @@ public abstract class PO log.log(Level.WARNING, "Index invalid - " + index); return false; } - Object newval = m_newValues[index]; - if (newval == Null.NULL) - newval = null; - Object oldval = m_oldValues[index]; - if (newval == null && oldval == null) + if (m_newValues[index] == null) return false; - if (newval == null) + if (m_newValues[index] == Null.NULL && m_oldValues[index] == null) return false; - return !newval.equals(oldval); + return !m_newValues[index].equals(m_oldValues[index]); } // is_ValueChanged /**