History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SMACK-188
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Matt Tucker
Reporter: Matt Tucker
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Smack

Close resources after reading keystore

Created: 02/07/07 05:36 PM   Updated: 02/11/07 09:08 PM
Component/s: None
Affects Version/s: 3.0.0 Beta 1
Fix Version/s: 3.0.0 Beta 2

Time Tracking:
Not Specified

Support Plan Customer Issue: No
Resolution Date: 02/11/07 09:08 PM
Acceptance Test - Add?: No


 Description  « Hide
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



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.