Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer exception when using NumberColumn::setPrintFormatter function #1047

Closed
hongwingl opened this issue Feb 13, 2022 · 2 comments
Closed

Comments

@hongwingl
Copy link

When I use setPrintFormatter(NumberFormat format, String missingValueIndicator) function in NumberColumn class, I get a NPE when the table is written to file. The problem is that formatter.setColumnType(this.type()); is not called in this function variant.

Fix is to change the function definition to

public void setPrintFormatter(NumberFormat format, String missingValueIndicator) {
    setPrintFormatter(new NumberColumnFormatter(format, missingValueIndicator));
}
@lwhite1
Copy link
Collaborator

lwhite1 commented Mar 27, 2022

i will look into this soon. sorry for the lengthy delay

@lwhite1
Copy link
Collaborator

lwhite1 commented Mar 28, 2022

fixed. Thank you @hongwingl for the bug report and for identifying the fix. Always appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants