Skip to content

又发现了数组下标越界异常,新的 #10

@listen-zhou

Description

@listen-zhou

java.lang.ArrayIndexOutOfBoundsException: null
#011at java.lang.System.arraycopy(Native Method)
#011at java.util.Arrays.copyOfRange(Arrays.java:3521)
#011at com.hiriver.unbiz.mysql.lib.protocol.datautils.MysqlStringUtils.readFixString(MysqlStringUtils.java:55)
#011at com.hiriver.unbiz.mysql.lib.protocol.binlog.event.BaseRowEvent.readRowColumnNullBitmap(BaseRowEvent.java:253)
#011at com.hiriver.unbiz.mysql.lib.protocol.binlog.event.BaseRowEvent.parseRow(BaseRowEvent.java:172)
#011at com.hiriver.unbiz.mysql.lib.protocol.binlog.event.RowEventV1.parseVerRowForUpdate(RowEventV1.java:37)
#011at com.hiriver.unbiz.mysql.lib.protocol.binlog.event.BaseRowEvent.parse(BaseRowEvent.java:148)
#011at com.hiriver.unbiz.mysql.lib.BinlogStreamBlockingTransportImpl.readEvent(BinlogStreamBlockingTransportImpl.java:363)
#011at com.hiriver.unbiz.mysql.lib.BinlogStreamBlockingTransportImpl.getBinlogOutputImmediately(BinlogStreamBlockingTransportImpl.java:256)
#011at com.hiriver.streamsource.impl.MysqlStreamSource.readValidInfo(MysqlStreamSource.java:52)
#011at com.hiriver.channel.stream.impl.DefaultChannelStream.providerThreadCore(DefaultChannelStream.java:263)
#011at com.hiriver.channel.stream.impl.DefaultChannelStream.access$000(DefaultChannelStream.java:45)
#011at com.hiriver.channel.stream.impl.DefaultChannelStream$2.run(DefaultChannelStream.java:232)
#011at java.lang.Thread.run(Thread.java:745)

我看了是数组拷贝的时候下标越界,我手动判断一下是否越界,如果越界,end下标就设置为length-1,保证不出现下标越界异常,看看效果怎么样。
顺便说下,这个异常出自新闻类的数据,中文字符居多,别的数据暂时没有这个异常

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions