Tim Ellison wrote:
On 09/Oct/2009 04:29, Jesse Wilson wrote:
On Thu, Oct 8, 2009 at 9:31 AM, odea...@apache.org wrote:
Add null check to equals() method.
// Checks two CredOwner objects for equality.
@Override
public boolean equals(Object obj) {
On 09/Oct/2009 04:29, Jesse Wilson wrote:
On Thu, Oct 8, 2009 at 9:31 AM, odea...@apache.org wrote:
Add null check to equals() method.
// Checks two CredOwner objects for equality.
@Override
public boolean equals(Object obj) {
+if (obj == null) {
On 09/Oct/2009 06:28, Ramana Polavarapu wrote:
It appears that Bloch suggests that we should have the following first:
if (!(object instanceof CredOwner)) return false;
Then, we can skip this check:
if (object instanceof CredOwner)
That is pretty much what Jesse wrote. Ok you
On Thu, Oct 8, 2009 at 9:31 AM, odea...@apache.org wrote:
Add null check to equals() method.
// Checks two CredOwner objects for equality.
@Override
public boolean equals(Object obj) {
+if (obj == null) {
+return false;
+}
It appears that Bloch suggests that we should have the following first:
if (!(object instanceof CredOwner)) return false;
Then, we can skip this check:
if (object instanceof CredOwner)
Regards,
Ramana
-Original Message-
From: Jesse Wilson [mailto:jessewil...@google.com]