goxr3plus / XR3Player

🎧 🎼 The MOST ADVANCED JavaFX Media Player
https://xr3player.netlify.com/
GNU Lesser General Public License v3.0
725 stars 176 forks source link

Update ExtensionTool.java #65

Open HelgeStenstrom opened 4 years ago

HelgeStenstrom commented 4 years ago

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

goxr3plus commented 3 years ago

@HelgeStenstrom

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

HelgeStenstrom commented 3 years ago

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 commented 2 years ago

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