fanyapeng / javadude

Automatically exported from code.google.com/p/javadude
0 stars 0 forks source link

Check booleans in hashCode() #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
   public int hashCode() {
       int result = 1;
       result = PRIME * result + ((adapterId_ == null) ? 0 :
adapterId_.hashCode());
       result = PRIME * result + ((adapterName_ == null) ? 0 :
adapterName_.hashCode());
       result = PRIME * result + ((cronExpression_ == null) ? 0 :
cronExpression_.hashCode());
       result = PRIME * result + (enabled_ ? 1231 : 1237);
       result = PRIME * result + ((jobClass_ == null) ? 0 :
jobClass_.hashCode());
       result = PRIME * result + ((jobName_ == null) ? 0 :
jobName_.hashCode());
       result = PRIME * result + ((jobParams_ == null) ? 0 :
jobParams_.hashCode());
       return result;
   }

Original issue reported on code.google.com by scott%ja...@gtempaccount.com on 19 Aug 2008 at 1:22

GoogleCodeExporter commented 9 years ago
See

http://macchiato.com/columns/Durable6.html

Original comment by scott%ja...@gtempaccount.com on 3 Nov 2008 at 5:02

GoogleCodeExporter commented 9 years ago
done

Original comment by scott%ja...@gtempaccount.com on 14 Feb 2009 at 5:15