diff --git a/org/postgresql/util/PGobject.java b/org/postgresql/util/PGobject.java index 0802d52..d70785a 100644 --- a/org/postgresql/util/PGobject.java +++ b/org/postgresql/util/PGobject.java @@ -77,7 +77,12 @@ public class PGobject implements Serializable, Cloneable public boolean equals(Object obj) { if (obj instanceof PGobject) - return ((PGobject)obj).getValue().equals(getValue()); + { + final Object othervalue = ((PGobject)obj).getValue(); + if (othervalue == null) + { return getValue() == null; } + return othervalue.equals(getValue()); + } return false; }