This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to annotated tag REL9_3_1100
in repository libpostgresql-jdbc-java.

commit 75276836eac2ca929683ca8b8ae983576ad582eb
Author: Dave Cramer <[email protected]>
Date:   Wed Feb 20 06:58:59 2013 -0500

    avoid NullPointerException from Derrik Hudson on User Defined Types
---
 org/postgresql/util/PGobject.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/org/postgresql/util/PGobject.java 
b/org/postgresql/util/PGobject.java
index 0802d52..a62c138 100644
--- a/org/postgresql/util/PGobject.java
+++ b/org/postgresql/util/PGobject.java
@@ -77,7 +77,14 @@ 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;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to