I ran FindBugs to check my code and it complains that method may fail to close stream:
Properties prop = new Properties();
prop.load(new FileInputStream("file.txt"));
...
Is it a mistake or just false positive? Will this stream be properly closed?
Stream handling is tedious (prior to Java 7). Before that you have to manually close the stream.
apache commons-lang can shorten the
finallyclause by itsIOUtils.closeQuitely(is), but note that it hides the exception