From 86d3d1facd79ff8fb6e2b34e5f923bf7f0783aed Mon Sep 17 00:00:00 2001 From: JaimeTruman <73758994+JaimeTruman@users.noreply.github.com> Date: Fri, 15 Jul 2022 16:48:36 +0200 Subject: [PATCH] in utils:formatValue added null check --- src/main/java/es/jaimetruman/Utils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/es/jaimetruman/Utils.java b/src/main/java/es/jaimetruman/Utils.java index f4c9e02..be2425e 100644 --- a/src/main/java/es/jaimetruman/Utils.java +++ b/src/main/java/es/jaimetruman/Utils.java @@ -18,7 +18,9 @@ public static String buildString (String... strings) { public static String formatValue (Object value) { String formatted; - if(value instanceof String || value instanceof UUID){ + if(value == null){ + return null; + }else if(value instanceof String || value instanceof UUID){ formatted = "'" + value.toString() + "'"; }else if (value instanceof Boolean) { formatted = (Boolean) value ? "1" : "0";