leif        02/02/06 00:40:13

  Modified:    src/scratchpad/org/apache/avalon/excalibur/datasource/cluster
                        DefaultHashedDataSourceCluster.java
  Log:
  Add a warning comment into the hashCode method
  
  Revision  Changes    Path
  1.3       +5 -1      
jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/datasource/cluster/DefaultHashedDataSourceCluster.java
  
  Index: DefaultHashedDataSourceCluster.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/datasource/cluster/DefaultHashedDataSourceCluster.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultHashedDataSourceCluster.java       6 Feb 2002 08:37:47 -0000       
1.2
  +++ DefaultHashedDataSourceCluster.java       6 Feb 2002 08:40:13 -0000       
1.3
  @@ -103,7 +103,7 @@
    * </pre>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Leif Mortenson</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/02/06 08:37:47 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/02/06 08:40:13 $
    * @since 4.1
    */
   public class DefaultHashedDataSourceCluster
  @@ -200,6 +200,10 @@
        *        DataSources will be provide a Connection.
        */
       public int getIndexForHashCode( int hashCode ) {
  +        // DEVELOPER WARNING:
  +        // If you change the way the hashCode is calculated, you WILL BREAK
  +        //  things for existing users, so please do so only after much 
thought.
  +        
           // Hash code may be negative, Make them all positive by using the 
unsigned int value.
           long lHashCode = ((long)hashCode) & 0xffffffffL;
           
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to