Skip to content

Commit

Permalink
in utils:formatValue added null check
Browse files Browse the repository at this point in the history
  • Loading branch information
JaimePolidura authored Jul 15, 2022
1 parent 45e13d8 commit 86d3d1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/es/jaimetruman/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 86d3d1f

Please sign in to comment.