File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
client-v2/src/main/java/com/clickhouse/client/api/data_formats/internal
main/java/com/clickhouse/jdbc/types
test/java/com/clickhouse/jdbc/types Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public Boolean convertBooleanToBoolean(Object value) {
120120 }
121121
122122 public Number convertBooleanToNumber (Object value ) {
123- return ((Number ) ((( Boolean )value ) ? 1 : 0 )). longValue () ;
123+ return ((Boolean ) value ) ? 1L : 0L ;
124124 }
125125
126126 public String convertBooleanToString (Object value ) {
@@ -227,15 +227,15 @@ public Timestamp convertSqlTimestampToSqlTimestamp(Object value) {
227227 }
228228
229229 public String convertDateToString (Object value ) {
230- return (( Date ) value ) .toString ();
230+ return value .toString ();
231231 }
232232
233233 public String convertTimeToString (Object value ) {
234- return (( Time ) value ) .toString ();
234+ return value .toString ();
235235 }
236236
237237 public String convertTimestampToString (Object value ) {
238- return (( Timestamp ) value ) .toString ();
238+ return value .toString ();
239239 }
240240
241241 /**
Original file line number Diff line number Diff line change @@ -159,9 +159,7 @@ public void close() throws SQLException {
159159
160160 @ Override
161161 public boolean wasNull () throws SQLException {
162- boolean tmp = wasNull ;
163- wasNull = false ;
164- return tmp ;
162+ return wasNull ;
165163 }
166164
167165 @ Override
Original file line number Diff line number Diff line change @@ -141,11 +141,13 @@ void testNullValues() throws SQLException {
141141 assertFalse (rs .wasNull ());
142142 assertEquals (rs .getInt (2 ), array [0 ]);
143143 assertFalse (rs .wasNull ());
144+ assertFalse (rs .wasNull ());
144145
145146 rs .next ();
146147 assertFalse (rs .wasNull ());
147148 assertEquals (rs .getInt (2 ), 0 );
148149 assertTrue (rs .wasNull ());
150+ assertTrue (rs .wasNull ());
149151 }
150152
151153 @ Test (dataProvider = "testPrimitiveValues" )
You can’t perform that action at this time.
0 commit comments