File tree Expand file tree Collapse file tree
src/main/java/com/blackrook/sql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ SQL (C) Black Rook Software
33by Matt Tropiano et al. (see AUTHORS.txt)
44
55
6+ Changed in 1.2.3
7+ ----------------
8+
9+ - ` Fixed ` Potential NPE in SQLRow.getString()
10+
11+
612Changed in 1.2.2
713----------------
814
Original file line number Diff line number Diff line change @@ -487,7 +487,11 @@ else if (obj instanceof String)
487487
488488 private String getString (Object obj )
489489 {
490- if (Utils .isArray (obj ))
490+ if (obj == null )
491+ {
492+ return null ;
493+ }
494+ else if (Utils .isArray (obj ))
491495 {
492496 if (Utils .getArrayType (obj ) == Byte .TYPE )
493497 return new String ((byte [])obj );
@@ -543,7 +547,7 @@ else if (obj instanceof Blob)
543547 return new String (bos .toByteArray ());
544548 }
545549 else
546- return obj != null ? String .valueOf (obj ) : null ;
550+ return String .valueOf (obj );
547551 }
548552
549553 private Timestamp getTimestamp (Object obj )
You can’t perform that action at this time.
0 commit comments