Skip to content

Commit

Permalink
fix: Fix possible null exeption
Browse files Browse the repository at this point in the history
  • Loading branch information
Romuald Rousseau committed Nov 28, 2024
1 parent b3f84a1 commit 80ada7d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
import com.github.romualdrousseau.archery.event.TableGraphBuiltEvent;
import com.github.romualdrousseau.archery.event.TableReadyEvent;
import com.github.romualdrousseau.archery.intelli.IntelliTable;

import com.github.romualdrousseau.archery.TransformableSheet;
import com.github.romualdrousseau.archery.commons.collections.CollectionUtils;
import com.github.romualdrousseau.archery.commons.strings.StringUtils;

public class BaseSheet implements Sheet {

Expand Down Expand Up @@ -258,7 +260,7 @@ public List<Integer> searchCell(final String regex, final int offset, final int
for(int i = 0; i < length; i++) {
for (int j = 0; j < this.getLastColumnNum(offset + i); j++) {
final var cell = this.getCellDataAt(j, offset + i);
if (cell != null && cell.matches(regex)) {
if (!StringUtils.isFastBlank(cell) && cell.matches(regex)) {
if (++n == nth) {
return List.of(j, offset + i);
}
Expand Down

0 comments on commit 80ada7d

Please sign in to comment.