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

getComment() throws but should return null instead #39

Closed
rotdrop opened this issue Nov 10, 2022 · 2 comments
Closed

getComment() throws but should return null instead #39

rotdrop opened this issue Nov 10, 2022 · 2 comments
Assignees
Labels

Comments

@rotdrop
Copy link
Contributor

rotdrop commented Nov 10, 2022

Describe the bug

API documents that UnifiedArchive::getComment() should return null when comments are not supported by either the archiver format or the used driver:

https://github.com/wapmorgan/UnifiedArchive/blob/master/docs/API.md#archive-information

However, the method actually throws an UnsupportedOperationException, see

throw new UnsupportedOperationException();

Configration (please complete the following information):
Irrelevant for this issue.

To Reproduce
Run UnifiedArchive::getComment() e.g. on a .tar file.

Expected behavior
The method should return null as per API documentation or the API documentation should state the the method throws. It is of course perfectly fine if the method throws an exception, it is just documented differently.

@wapmorgan wapmorgan self-assigned this Nov 11, 2022
@wapmorgan wapmorgan added the bug label Nov 11, 2022
@wapmorgan
Copy link
Owner

Fixed in 0d8a9b8

@wapmorgan
Copy link
Owner

released in 1.1.8.

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

No branches or pull requests

2 participants