When a unit test opens a resource it should ensure it is always closed. This can be accomplished using a finally block without the catch. This way the exceptions are still thrown.
~~~~~:::java
InputStream in = ...
try {
// io logic
} finally {
in.close()
}
~~~~
What I can understand is that this ticket talks about the closing of the resources where ever the resources are open. Is it still open, can I take up this task? And we have to do it on trunk I guess.
Yep it's still open. In many of the tests a stream is opened but never closed (bad) or it is opened and closed outside of a finally (not too bad).
These will be spread all over the test suite but there may be a concentration in the io module.
Also, the svn (and thus trunk) is only there for legacy - I believe they're quite far behind now. I would put these changes on the 'master' branch of the git repo. The current stable is 'cdk-1.4.x' but these changes only affect development and so there is no gain in putting it on stable.
Sent from my iPhone
On 30 Dec 2012, at 11:31, "Sambit Gaan" sambitgaan@users.sf.net wrote:
Related
Junior Jobs: #15