Hi,
I have a question regarding the implementation of org.eclipse.jgit.lib.Repository.
As I see there is a use counter which tracks the number of usages. It is incremented
in the method 'incrementOpen()' and decremented in the method 'close()'.
The 'close()' method takes care to release resources when the use counter drops to zero
(e.g. it closes the object database).
However I'm a bit surprised by the initial value of the use counter, which is 1.
This means when I open a repository, work with it and the close the repository
the use counter is back to 1 and the close method does not release any resources.
I would expect that all resources are freed when close was as often called as the
use counter was incremented.
I'm currently trying to implement rename of repositories in Gerrit and I noticed that
some open file handles stay after working with a repository and closing it. The open
file handles then prevent renaming the repository folder in the filesystem.
Any ideas? Is this a bug in JGit?
I'm looking at JGit 0.8.4.389-gba984ba.
Thanks and best regards, Edwin
Edwin Kempin
Senior Developer
TD Core JS&I DPI (AG)
SAP AG
Dietmar-Hopp-Allee 16
69190 Walldorf, Germany
Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx
Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine
Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying,
or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.