nmadhire / jwpl

Automatically exported from code.google.com/p/jwpl
0 stars 0 forks source link

Resources not closed in setRevisionTextAndParts #121

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Just use the revision iterator with shouldLoadRevisionText = true.

What is the expected output? What do you see instead?
After processing ~2.500.000 revisions, my program slowly started to die. Did 
some profiling and found out that in the setRevisionTextAndParts method of the 
RevisionApi class, the PreparedStatement and the ResultSet are set twice, 
without closing them in between.

What version of the product are you using? On what operating system?
0.9.2, Ubuntu 12.04.

Please provide any additional information below.
Made a simple fix for this and confirmed through profiling that the objects are 
now properly cleaned up.

Original issue reported on code.google.com by ljtijh...@gmail.com on 21 Aug 2013 at 10:05

GoogleCodeExporter commented 9 years ago
Could you please provide the fix that solves the issue. Thanks.

Original comment by torsten....@gmail.com on 30 Aug 2013 at 12:46

GoogleCodeExporter commented 9 years ago
The attached version contains the fix. Just an extra pair of try/finally 
brackets and closing the statement and result.

Original comment by ljtijh...@gmail.com on 30 Aug 2013 at 12:56

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, fixed in latest snapshot.

Original comment by torsten....@gmail.com on 30 Aug 2013 at 12:59

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 11 Sep 2014 at 1:35

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 11 Sep 2014 at 1:36