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

Update ExtensionTool.java #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HelgeStenstrom
Copy link
Contributor

getFileExtension() doesn't return null, so we don't have to check for it.

getFileExtension() doesn't return null, so we don't have to check for it.
@goxr3plus
Copy link
Owner

@HelgeStenstrom

Have you tested this with files that have no extension :) ?

@HelgeStenstrom
Copy link
Contributor Author

No, I haven't tested it, I have just studied the code.
IntelliJ says that extension != null is always true.
extension is never null, because IOInfo.getFileExtension(fileName) never returns null.
IOInfo.getFileExtension(fileName) never returns null, because String.toLowerCase() never returns null.

@goxr3plus
Copy link
Owner

I will check it with real files soon to see every case , thanks :)

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

Successfully merging this pull request may close these issues.

2 participants