You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2011/01/23 17:33:43 UTC

[jira] Assigned: (WICKET-3372) XmlReaderTest fail because getClass.getResourceAsStream is not markSupported

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

Juergen Donnerstag reassigned WICKET-3372:
------------------------------------------

    Assignee: Juergen Donnerstag

> XmlReaderTest fail because getClass.getResourceAsStream is not markSupported
> ----------------------------------------------------------------------------
>
>                 Key: WICKET-3372
>                 URL: https://issues.apache.org/jira/browse/WICKET-3372
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>         Environment: java version "1.6.0_22"
>            Reporter: Richard Emberson
>            Assignee: Juergen Donnerstag
>            Priority: Trivial
>
> Wicket-Core org.apache.wicket.util.io.XmlReaderTest fails because 
> this.getClass().getResourceAsStream("test_1.html") (as an example - all
> of the tests in this test fail)
> returns an InputStream that does not support marks
> (markSupported() == false). 
> In the constructor to XmlReader there is a check for mark support:
>         public void init() throws IOException
>         {
>                 if (!inputStream.markSupported())
>                 {
>                         throw new IOException("The InputStream must support mark/reset");
>                 }
> ...
>         }
> which fails.
> Fix is to either wrap the InputStream returned from getClass.getResourceAsStream
> in a BufferedInputStream in the XmlReaderTest test or in the XmlReader constructor
> test for mark support and if it is not supported, then wrap the inputstream
> in the constructor with a BufferedInputStream.
> Strange that this shows up in Java version "1.6.0_22" but not whatever
> everyone else is using.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.