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
            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.

Reply via email to