Bukkit/Bukkit — comment on commit 094baecc0636caff880660a730701e3efb5e0581
File:  line 0
By FibreFoX:

@Afforress
hm, i just saw URLConnection and my brain just went "oh f* ... *freezes*" ... but also this is a lot more objects that causes to have to be removed by GC :( more for GC says more for lags/short-time-freezes

@TheGurw
Nope, the if (filename == null) just checks if there was nothing than null, but does not check if the filename really was empty. Getting NULL by that exception doesn't say anything about what happened, it just says there happened something. If you have to sizzle out what the problem was, here you go within trouble ... ;) wouldn't it be nice to check for no-length?

if (filename.trim().length() == 0) {

throw new IllegalArgumentException("Filename cannot be empty");

}