From 74e94cb77fd9d3ac9d72f5a4820924710f3f0312 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 15 Nov 2022 14:53:06 +0100 Subject: [PATCH] IDEMPIERE-5136 Set Messages at tenant level / Fix NPE (#1561) --- org.adempiere.base/src/org/compiere/model/MMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MMessage.java b/org.adempiere.base/src/org/compiere/model/MMessage.java index 6501aa167a..50dc992b5b 100644 --- a/org.adempiere.base/src/org/compiere/model/MMessage.java +++ b/org.adempiere.base/src/org/compiere/model/MMessage.java @@ -215,7 +215,7 @@ public class MMessage extends X_AD_Message implements ImmutablePOSupport protected boolean beforeSave(boolean newRecord) { // To avoid conflicts with tenant level messages, the value cannot start with numeric and | - if (getValue().contains("|")) { + if (getValue() != null && getValue().contains("|")) { String prefix = getValue().substring(0, getValue().indexOf("|"));