From 1dff9b09e8976b63f0588ea180e69c27efafe2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garcia=20Nu=C3=B1ez?= Date: Fri, 20 Dec 2019 00:04:58 +0100 Subject: [PATCH] Control de parametros nulos. --- .../MyHealth/src/managedbean/common/ValidationUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/1.sources/MyHealth/src/managedbean/common/ValidationUtils.java b/1.sources/MyHealth/src/managedbean/common/ValidationUtils.java index 8d90abd..e66ae0a 100644 --- a/1.sources/MyHealth/src/managedbean/common/ValidationUtils.java +++ b/1.sources/MyHealth/src/managedbean/common/ValidationUtils.java @@ -69,7 +69,10 @@ public class ValidationUtils { */ public static boolean checkIfNifAlreadyRegistered(CommonFacadeRemote remoteSvc, UserType userType, String nif, Integer id) { boolean nifExists = false; - + + if (userType == null || remoteSvc == null) + return nifExists; + switch (userType) { case ADMINISTRATOR: break;