Skip to content

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