Purpose of FileUtils.close(...) (was: Re: [Patch] FileUtils more minor changes)

2004-12-16 Thread Jesse Glick
Kev Jackson wrote: As an aside, I went through the entire codebase last night and replaced every try { somthing.close() } catch (IOException e) { //swallow exception } with FileUtils.close() So what exactly *is* the intention of this method? IMHO, if an IOException was thrown when some strea

[Patch] FileUtils more minor changes

2004-12-16 Thread Kev Jackson
- new generic close method - reduces duplicate code (may be useful for when we can finally remove code -> Ant2?) - minor loop tweak - buffer compare for JDK1.4+ (only runs on files < 1Mb to conserve memory during builds) +int stackSize = s.size(); while (tok.hasMoreTokens()) {