liangsi03 / ik-analyzer

Automatically exported from code.google.com/p/ik-analyzer
0 stars 0 forks source link

java.lang.ArrayIndexOutOfBoundsException: 3072 #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
org.wltea.analyzer.core.AnalyzeContext中
//默认缓冲区大小
private static final int BUFF_SIZE = 3072;
能修改么?
javadoc中没找到相关方法。
我是初学者,问题水平可能比较低,还望耐心解答。

Original issue reported on code.google.com by onionsh...@gmail.com on 20 Mar 2012 at 1:00

GoogleCodeExporter commented 8 years ago
在调用时,没有做数组越界检查
at org.wltea.analyzer.core.AnalyzeContext.moveCursor(AnalyzeContext.java:159)

boolean moveCursor(){
        if(this.cursor < this.available){
            this.cursor++;
            this.segmentBuff[this.cursor] = CharacterUtil.regularize(this.segmentBuff[this.cursor]);
            this.charTypes[this.cursor] = CharacterUtil.identifyCharType(this.segmentBuff[this.cursor]);
            return true;
        }else{
            return false;
        }
    }

Original comment by onionsh...@gmail.com on 20 Mar 2012 at 1:05

GoogleCodeExporter commented 8 years ago
该问题已在u3版本中修正

Original comment by linliang...@gmail.com on 21 Mar 2012 at 7:39