From 71b288f76fbe4e1d946afa9ddc4fd3268388fabe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 21 Jan 2023 10:02:55 +0100 Subject: [PATCH] Please cherry-pick: - "validate" parameter, e.g. where you don't want null references, then check if it is null to prevent possible logic errors and maybe here a wrong/misleading result --- .../contact/list/FinancialsContactListWebViewBean.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java b/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java index f0dba3c9..45e7cba8 100644 --- a/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java +++ b/src/java/org/mxchange/jfinancials/beans/contact/list/FinancialsContactListWebViewBean.java @@ -511,6 +511,12 @@ public class FinancialsContactListWebViewBean extends BaseFinancialsBean impleme @Override public boolean isContactFound (final Contact contact) { + // Validate parameter + if (null == contact) { + // Throw NPE + throw new NullPointerException("Parameter 'contact' is null"); //NOI18N + } + // Default is not found boolean IsFound = false; -- 2.39.5