You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/11/01 13:19:33 UTC

[jira] [Commented] (WICKET-5745) Markupfile inputstream not being closed

    [ https://issues.apache.org/jira/browse/WICKET-5745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193123#comment-14193123 ] 

Martin Grigorov commented on WICKET-5745:
-----------------------------------------

Critical priority means that your application cannot function for some reason.

Do you have any proofs from tools like 'lsof' or something similar that file handles leak ?

> Markupfile inputstream not being closed
> ---------------------------------------
>
>                 Key: WICKET-5745
>                 URL: https://issues.apache.org/jira/browse/WICKET-5745
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.17.0
>         Environment: dev
>            Reporter: Uffe Heerfordt
>            Priority: Minor
>              Labels: easyfix
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Hi,
> I was investigating a problem today with a profiler and was inform that a potentiel issue existed with fileinputstreams that wasen't being closed. I could that it was my wicket markup files that was never being closed.
> The problem seems to be located here: 
> org.apache.wicket.markup.AbstractMarkupParser
> method: parse();
> Should'nt there be an explict call to close the MarkupResourceStream after parsning the markup after line 183.
> Something like:
> 		// Initialize the xml parser
> 		MarkupResourceStream markupResourceStream = markup.getMarkupResourceStream();
> 		try{
> 			xmlParser.parse(markupResourceStream.getResource().getInputStream(),
> 				markupSettings.getDefaultMarkupEncoding());
> 	
> 			// parse the xml markup and tokenize it into wicket relevant markup
> 			// elements
> 			parseMarkup();
> 		}
> 		finally{
> 			markupResourceStream.close();
> 		}
> Br,
> Uffe.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)