[ 
https://issues.apache.org/jira/browse/WICKET-5745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-5745.
-------------------------------------
    Resolution: Not a Problem

The InputStream is passed to the XmlPullParser and it closes it properly.
See org.apache.wicket.markup.parser.XmlPullParser#parse(java.io.InputStream, 
java.lang.String)

> 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
>         Attachments: afterexplitctclosefromprofiler.jpg, fromprofiler.jpg
>
>   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)

Reply via email to