atom feed1 message in net.java.dev.jtharness.commitssvn commit: r840 - branches/users/sbo...
FromSent OnAttachments
serg...@dev.java.netMar 31, 2008 1:24 am 
Subject:svn commit: r840 - branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java
From:serg...@dev.java.net (serg@dev.java.net)
Date:Mar 31, 2008 1:24:54 am
List:net.java.dev.jtharness.commits

Author: sergey_borodin Date: 2008-03-31 08:24:52+0000 New Revision: 840

Modified: branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java

Log: fix for issue 16

Modified:
branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java Url:
https://jtharness.dev.java.net/source/browse/jtharness/branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java?view=diff&rev=840&p1=branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java&p2=branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java&r1=839&r2=840 ============================================================================== --- branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java
(original) +++ branches/users/sborodin/issue16/code/src/com/sun/interview/Question.java
2008-03-31 08:24:52+0000 @@ -442,6 +442,9 @@ * or are equal. */ public boolean equals(Object other) { + if (this == other) + return true; + if ( !(other instanceof Question)) return false;

@@ -454,6 +457,14 @@ return (s1 == null || s2 == null ? s1 == s2 : s1.equals(s2)); }

+ public int hashCode() { + int hash = 7; + hash = 31 * hash + (null == tag ? 0 : tag.hashCode()); + String str_val = getStringValue(); + hash = 31 * hash + (null == str_val ? 0 : str_val.hashCode()); + + return hash; + } /** * Get an entry from the interview's resource bundle. * The parent and other ancestors bundles will be checked first before