This is an automated email from the ASF dual-hosted git repository.

agingade pushed a commit to branch feature/GEODE-4947
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 8454a952c9ba87711f5499f7c4a4292aff0513cd
Author: Nick Reich <nre...@pivotal.io>
AuthorDate: Mon Apr 2 14:05:34 2018 -0700

    GEODE-4947: Fix issue with null character string in Postgres
---
 .../java/org/apache/geode/connectors/jdbc/internal/SqlHandler.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlHandler.java
 
b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlHandler.java
index 3e49cf2..8fc2c5e 100644
--- 
a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlHandler.java
+++ 
b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/SqlHandler.java
@@ -113,7 +113,9 @@ public class SqlHandler {
       index++;
       Object value = columnValue.getValue();
       if (value instanceof Character) {
-        value = ((Character) value).toString();
+        Character character = ((Character) value);
+        // if null character, set to null string instead of a string with the 
null character
+        value = character == Character.valueOf((char) 0) ? null : 
character.toString();
       } else if (value instanceof Date) {
         Date jdkDate = (Date) value;
         switch (columnValue.getDataType()) {

-- 
To stop receiving notification emails like this one, please contact
aging...@apache.org.

Reply via email to