Andrea Del Bene created WICKET-5700:
---------------------------------------

             Summary: AbstractMarkupParser and IXmlPullParser should not bypass 
IResourceStream
                 Key: WICKET-5700
                 URL: https://issues.apache.org/jira/browse/WICKET-5700
             Project: Wicket
          Issue Type: Improvement
    Affects Versions: 6.17.0, 7.0.0-M3
            Reporter: Andrea Del Bene
            Priority: Trivial


The current implementation of AbstractMarkupParser parses markup running method 
IXmlPullParser#parse(inputStream,encoding). The given inputstream is extracted 
from an instance of  IResourceStream:

{code}
// Initialize the xml parser
                MarkupResourceStream markupResourceStream = 
markup.getMarkupResourceStream();
                
xmlParser.parse(markupResourceStream.getResource().getInputStream(),
                        markupSettings.getDefaultMarkupEncoding());
{code}

The code above closes the underlying inputstream bypassing method close()  of 
IResourceStream. This can be a problema as it leaves IResourceStream 
implementations in an inconsistent state.



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

Reply via email to