lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject 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:48:09 GMT
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/analysis/cn/smart/hhmm/SegToken.java
    lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegTokenPair.java

Modified: lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegToken.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/smartcn/src/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/analysis/cn/smart/hhmm/SegToken.java
(original)
+++ lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/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/analysis/cn/smart/hhmm/SegTokenPair.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegTokenPair.java?rev=802085&r1=802084&r2=802085&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/SegTokenPair.java
(original)
+++ lucene/java/trunk/contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/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;



Mime
View raw message