I'm duplicating the open issue lz4#180 here:
The available method in class LZ4FrameInputStream assumes the buffer field is not null. However, that field is set in the private readHeader method which may not have been executed yet. This results in a NullPointerException being thrown by the available method if it is called right after the LZ4FrameInputStream is created.
This bug was introduced with lz4#146, as no check has been added to available like to other methods.
I'll take the liberty of creating a PR for it, hope that's fine.
I'm duplicating the open issue lz4#180 here:
This bug was introduced with lz4#146, as no check has been added to
availablelike to other methods.I'll take the liberty of creating a PR for it, hope that's fine.