lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: svn commit: r802085 - in /lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm: SegToken.java SegTokenPair.java
Date Fri, 07 Aug 2009 16:55:43 GMT
By the way: o.a.l.util.ArrayUtil contains a hashCode impl for char arrays.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: mikemccand@apache.org [mailto:mikemccand@apache.org]
> Sent: Friday, August 07, 2009 6:48 PM
> To: java-commits@lucene.apache.org
> Subject: svn commit: r802085 - in
> /lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/an
> alysis/cn/smart/hhmm: SegToken.java SegTokenPair.java
> 
> Author: mikemccand
> Date: Fri Aug  7 16:48:09 2009
> New Revision: 802085
> 
> URL: http://svn.apache.org/viewvc?rev=802085&view=rev
> Log:
> fix smartcn to be JDK 1.4 only
> 
> Modified:
> 
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegToken.java
> 
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegTokenPair.java
> 
> Modified:
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegToken.java
> URL:
> http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/smartcn/s
> rc/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java?rev=802085&
> r1=802084&r2=802085&view=diff
> ==========================================================================
> ====
> ---
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegToken.java (original)
> +++
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegToken.java Fri Aug  7 16:48:09 2009
> @@ -91,7 +91,9 @@
>    public int hashCode() {
>      final int prime = 31;
>      int result = 1;
> -    result = prime * result + Arrays.hashCode(charArray);
> +    for(int i=0;i<charArray.length;i++) {
> +      result = prime * result + charArray[i];
> +    }
>      result = prime * result + endOffset;
>      result = prime * result + index;
>      result = prime * result + startOffset;
> 
> Modified:
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegTokenPair.java
> URL:
> http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/smartcn/s
> rc/java/org/apache/lucene/analysis/cn/smart/hhmm/SegTokenPair.java?rev=802
> 085&r1=802084&r2=802085&view=diff
> ==========================================================================
> ====
> ---
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegTokenPair.java (original)
> +++
> lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/ana
> lysis/cn/smart/hhmm/SegTokenPair.java Fri Aug  7 16:48:09 2009
> @@ -51,7 +51,9 @@
>    public int hashCode() {
>      final int prime = 31;
>      int result = 1;
> -    result = prime * result + Arrays.hashCode(charArray);
> +    for(int i=0;i<charArray.length;i++) {
> +      result = prime * result + charArray[i];
> +    }
>      result = prime * result + from;
>      result = prime * result + to;
>      long temp;
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message