Stephen Haberman has submitted this change and it was merged.

Change subject: Avoid NPE in Timestamp.equals.
......................................................................


Avoid NPE in Timestamp.equals.

Bug: issue 6992
Change-Id: I044d3ddcabc5e41ed8fb9f871c35f700ff1d02eb
---
M user/super/com/google/gwt/emul/java/sql/Timestamp.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Daniel Kurka: Looks good to me, approved
  Leeroy Jenkins: Verified



diff --git a/user/super/com/google/gwt/emul/java/sql/Timestamp.java b/user/super/com/google/gwt/emul/java/sql/Timestamp.java
index cfa4fa4..f63f359 100644
--- a/user/super/com/google/gwt/emul/java/sql/Timestamp.java
+++ b/user/super/com/google/gwt/emul/java/sql/Timestamp.java
@@ -128,7 +128,7 @@
   }

   public boolean equals(Timestamp ts) {
-    return (getTime() == ts.getTime() && getNanos() == ts.getNanos());
+ return ts != null && getTime() == ts.getTime() && getNanos() == ts.getNanos();
   }

   public int getNanos() {

--
To view, visit https://gwt-review.googlesource.com/3011
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I044d3ddcabc5e41ed8fb9f871c35f700ff1d02eb
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Stephen Haberman <[email protected]>
Gerrit-Reviewer: Daniel Kurka <[email protected]>
Gerrit-Reviewer: Leeroy Jenkins <[email protected]>
Gerrit-Reviewer: Stephen Haberman <[email protected]>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to