Commit 827a0e4f by Antti Tönkyrä

Quick fix for accidental brainfart during review

1 parent d08dbee8
...@@ -58,7 +58,9 @@ public class JsonAttributeConverter implements AttributeConverter<JsonObject, PG ...@@ -58,7 +58,9 @@ public class JsonAttributeConverter implements AttributeConverter<JsonObject, PG
// Read the value as JSON // Read the value as JSON
String stringValue = pgObject.getValue(); String stringValue = pgObject.getValue();
if (stringValue != null) {
// We must test for "null" because pgObject.getValues() seems to return "null" for null :)
if (stringValue != null && !stringValue.toLowerCase().equals("null")) {
JsonReader jsonReader = Json.createReader(new StringReader(stringValue)); JsonReader jsonReader = Json.createReader(new StringReader(stringValue));
JsonObject jsonObject = jsonReader.readObject(); JsonObject jsonObject = jsonReader.readObject();
log.info("Converted PGobject to JsonObject: {}", jsonObject); log.info("Converted PGobject to JsonObject: {}", jsonObject);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!