@@ -100,31 +100,31 @@ public static void setStatementParam(PreparedStatement statement, int paramNumbe
100
100
JsonObject body ) throws SQLException {
101
101
try {
102
102
if (isNumeric (colName )) {
103
- if (body .get (colName ) != null ) {
103
+ if (( body .get (colName ) != null ) && ( body . get ( colName ) != JsonValue . NULL ) ) {
104
104
statement .setBigDecimal (paramNumber , body .getJsonNumber (colName ).bigDecimalValue ());
105
105
} else {
106
106
statement .setBigDecimal (paramNumber , null );
107
107
}
108
108
} else if (isTimestamp (colName )) {
109
- if (body .get (colName ) != null ) {
109
+ if (( body .get (colName ) != null ) && ( body . get ( colName ) != JsonValue . NULL ) ) {
110
110
statement .setTimestamp (paramNumber , Timestamp .valueOf (body .getString (colName )));
111
111
} else {
112
112
statement .setTimestamp (paramNumber , null );
113
113
}
114
114
} else if (isDate (colName )) {
115
- if (body .get (colName ) != null ) {
115
+ if (( body .get (colName ) != null ) && ( body . get ( colName ) != JsonValue . NULL ) ) {
116
116
statement .setDate (paramNumber , Date .valueOf (body .getString (colName )));
117
117
} else {
118
118
statement .setDate (paramNumber , null );
119
119
}
120
120
} else if (isBoolean (colName )) {
121
- if (body .get (colName ) != null ) {
121
+ if (( body .get (colName ) != null ) && ( body . get ( colName ) != JsonValue . NULL ) ) {
122
122
statement .setBoolean (paramNumber , body .getBoolean (colName ));
123
123
} else {
124
124
statement .setBoolean (paramNumber , false );
125
125
}
126
126
} else {
127
- if (body .get (colName ) != null ) {
127
+ if (( body .get (colName ) != null ) && ( body . get ( colName ) != JsonValue . NULL ) ) {
128
128
statement .setString (paramNumber , body .getString (colName ));
129
129
} else {
130
130
statement .setNull (paramNumber , Types .VARCHAR );
0 commit comments