Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.0.0 Beta 1
-
Fix Version/s: 3.0.0 Beta 2
-
Component/s: None
-
Labels:None
-
Acceptance Test - Add?:No
Description
For description and patch see:
http://www.igniterealtime.org/forum/thread.jspa?threadID=24470
Pasted text:
------------------------
Hi guys,
Smack opens a new file for the trust store every time a connection is created, but it never cleans up after itself once KeyLoad.load has done its job. The fix, of course, is simple and I've attached it.
Here is a simple block of code that will illustrate the problem (i.e., that the file remains open):
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
FileInputStream is = new FileInputStream("/etc/java-6-sun/security/cacerts");
System.out.println(is.getChannel().isOpen()); // expected true
trustStore.load(is, "changeit".toCharArray());
System.out.println(is.getChannel().isOpen()); // expected true, desired false