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

StreamingCell.getBooleanCellValue( ) is dangerous #54

Closed
gredler opened this issue Sep 1, 2016 · 2 comments
Closed

StreamingCell.getBooleanCellValue( ) is dangerous #54

gredler opened this issue Sep 1, 2016 · 2 comments

Comments

@gredler
Copy link

gredler commented Sep 1, 2016

This library is very nice in that it provides an easy drop-in replacement for simple uses of the vanilla POI API. One important part of this ease-of-use is that unimplemented features are reported very obviously at runtime via e.g. NotSupportedExceptions. If you try this library with your existing code and you don't get any exceptions at runtime, you're probably OK.

Unfortunately, StreamingCell.getBooleanCellValue() breaks this convention and assumption by not being implemented, but rather than throwing an exception it simply returns false. If users are not very, very careful, this could encourage them to start using this library when in fact it doesn't implement functionality that they need.

I don't know if StreamingCell.getBooleanCellValue() can be implemented or not; if it can, then it would be great to see it implemented; if it can't be implemented, then throwing a NotSupportedException would be more appropriate than just returning false.

https://github.com/monitorjbl/excel-streaming-reader/blob/master/src/main/java/com/monitorjbl/xlsx/impl/StreamingCell.java#L305

@monitorjbl
Copy link
Owner

Good catch! I was actually just in the middle of reviewing #50 when you opened this issue. I just merged it, so the next release will support getBooleanCellValue()

@gredler
Copy link
Author

gredler commented Sep 1, 2016

Ah, nice -- thanks so much!

rimuln pushed a commit to rimuln/excel-streaming-reader that referenced this issue Nov 15, 2021
Bumps commons-io from 2.10.0 to 2.11.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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