Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Conversation

@marchocode
Copy link

在开发中发现此 AbstractRowHeightStyleStrategy 类中,context.getRelativeRowIndex() 调用会产生 null 值。而同类的两个抽象方法都是使用int 作为接收参数,转换过程中会存在空指针的异常出现。

同时 默认实现的 SimpleRowHeightStyleStrategy 也应该使用 Integer 作为参数接收。

PR修复了以上问题。

    @Override
    public void afterRowDispose(RowWriteHandlerContext context) {
        if (context.getHead() == null) {
            return;
        }
        if (context.getHead()) {
            setHeadColumnHeight(context.getRow(), context.getRelativeRowIndex());
        } else {
            setContentColumnHeight(context.getRow(), context.getRelativeRowIndex());
        }
    }

    protected abstract void setHeadColumnHeight(Row row, int relativeRowIndex);

    protected abstract void setContentColumnHeight(Row row, int relativeRowIndex);

@CLAassistant
Copy link

CLAassistant commented Dec 20, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants