Looks like this is caused by DTD.java's use of available() again. This time the test is failing because RAFStream.available() is being called by DTD.read() and its return value is expected to be a true indication of the number of bytes available. However, the RAFStream.available() call will only return 0 or 1 in our implementation which causes the DTD.read() to only read a single byte rather than the whole DTD. I hacked RAFStream.available() to return (mLength-mOffset) and this makes the test pass, but twe really need to fix the DTD.read() method to not use available() at all I think.

Regards,
Oliver

On 25/01/2010 13:15, Oliver Deakin wrote:
Hi Ray,

Thanks for the information - from your results it seems that there must be a difference in common classes between java 5 and 6 that are causing the failures. I see the same result - with the java5 M12a swing.jar the test passes 100% and with the java6 swing.jar it fails 100%.

I'll dig a little deeper at the code differences between the modules.

Regards,
Oliver

On 25/01/2010 12:10, Ray Chen wrote:
Hi Oliver,
I have done some investigation for this issue before, and disscussed
it on the 6.0 Milestone1 thread.

I compared two swing.jar of trunk and java6, the only difference
between them is that java6 added some new classes:

javax\swing\event\RowSorterEvent$Type.class
javax\swing\event\RowSorterEvent.class
javax\swing\event\RowSorterListener.class
javax\swing\filechooser\FileNameExtensionFilter.class
javax\swing\RowSorter$SortKey.class
javax\swing\RowSorter.class
javax\swing\SortOrder.class

I think these classes are not related to this test. However, even
after I removed these new added classes or replaced trunk's swing.jar
with java6's swing.jar and run the test on the modified trunk , the
test still failed.
And trunk's swing.jar works well in both trunk and java6 to run this test.
So I am a little confused,  same classes, same vm, why different result?

On Mon, Jan 25, 2010 at 7:03 PM, Oliver Deakin (JIRA)<j...@apache.org> wrote:
[ https://issues.apache.org/jira/browse/HARMONY-6392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804502#action_12804502 ]

Oliver Deakin commented on HARMONY-6392:
----------------------------------------

This issue has been fixed in java5 M12, but still persists in the java6 branch.

[classlib][swing] Test failures in javax.swing.text.html.HTMLDocument_Reader_ActionsTest ----------------------------------------------------------------------------------------

                 Key: HARMONY-6392
URL: https://issues.apache.org/jira/browse/HARMONY-6392
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 6.0M1, 5.0M12
         Environment: Windows x86
            Reporter: Oliver Deakin
             Fix For: 5.0M12


I see 1 failure and 1 error.
javax.swing.text.html.HTMLDocument_Reader_ActionsTest.testHarmony_4582 fails with output:
N/A
java.lang.NullPointerException
at javax.swing.text.html.HTMLDocument_Reader_ActionsTest.testHarmony_4582(HTMLDocument_Reader_ActionsTest.java:584)
at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
at javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:116) at javax.swing.BasicSwingTestCase.runBareImpl(BasicSwingTestCase.java:121)
at javax.swing.BasicSwingTestCase$1.run(BasicSwingTestCase.java:135)
at java.lang.Thread.run(Thread.java:669)
javax.swing.text.html.HTMLDocument_Reader_ActionsTest.testHarmony_4615 fails with output:
null expected:<[line4 line4]>  but was:<[ line4 line]>
junit.framework.ComparisonFailure: null expected:<[line4 line4]> but was:<[line4 line]> at javax.swing.text.html.HTMLDocument_Reader_ActionsTest.testHarmony_4615(HTMLDocument_Reader_ActionsTest.java:601)
at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
at javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:116) at javax.swing.BasicSwingTestCase.runBareImpl(BasicSwingTestCase.java:121)
at javax.swing.BasicSwingTestCase$1.run(BasicSwingTestCase.java:135)
at java.lang.Thread.run(Thread.java:669)
These tests pass for me against M11.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.






--
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Reply via email to