You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (JIRA)" <ji...@apache.org> on 2014/09/16 18:49:35 UTC

[jira] [Closed] (WICKET-5700) AbstractMarkupParser and IXmlPullParser should not bypass IResourceStream

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

Andrea Del Bene closed WICKET-5700.
-----------------------------------
    Resolution: Fixed

> 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: 7.0.0-M3, 6.17.0
>            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)