优化Sax方式读取时空白行返回0,修改为返回-1

This commit is contained in:
Looly
2023-04-27 18:49:14 +08:00
parent f96cf1127c
commit 8a4496b3af
2 changed files with 3 additions and 3 deletions

View File

@@ -172,9 +172,8 @@ public class SheetDataSaxHandler extends DefaultHandler {
*/
private void startRow(Attributes attributes) {
final String rValue = AttributeName.r.getValue(attributes);
if (null != rValue) {
this.rowNumber = Long.parseLong(rValue) - 1;
}
// https://gitee.com/dromara/hutool/issues/I6WYF6
this.rowNumber = (null == rValue) ? -1 : Long.parseLong(rValue) - 1;
}
/**