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