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 17:40:36 UTC
[jira] [Created] (WICKET-5700) AbstractMarkupParser and
IXmlPullParser should not bypass IResourceStream
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)