mjiderhamn/classloader-leak-prevention — pull request #10 by ArloL (2013-11-26 09:42:57+00:00)
Title: Exceptions cause ClassLoader not to be collected and are thus swallowed

If you e.g. call

```
@Test
@Leaks(value = false)
public void triggerLeak() throws Exception {
InputStream is = null;
try {
is = new FileInputStream("./app.truststore");
} catch (Exception e) {
System.out.println(e);
} finally {
if (is != null) {
is.close();
}
}
}
```

it will throw a FileNotFoundException if the file does not exists. Therefore the Classloader loads the FileNotFoundException class. This in turn prevents the Classloader from being collected. This in turn hides fails the test and swallows the exception. I was hunting a bug for a few hours because of this :/