harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetlana Samoilenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1743) [classlib][swing]javax.swing.text.html.parser.DTD.getDTD(null) throws unspecified IllegalArgumentException
Date Fri, 06 Oct 2006 10:33:20 GMT
[classlib][swing]javax.swing.text.html.parser.DTD.getDTD(null) throws unspecified IllegalArgumentException

                 Key: HARMONY-1743
                 URL: http://issues.apache.org/jira/browse/HARMONY-1743
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Svetlana Samoilenko
            Priority: Minor

Compatibility issue.
There is no mention of any exception except for IOException in the specification.
Harmony throws IllegalArgumentException for DTD.getDTD(null) while RI throws NPE.
The same issue is for DTD.putDTDHash(null,DTD) method.

Test for reproducing:

import junit.framework.TestCase;
import javax.swing.text.html.parser.*;
import java.io.*;
public class test extends TestCase  {          
    public void testGetDTD_Null() throws IOException {
        try {
            fail("NullPointerException is thrown"); 
        } catch (NullPointerException e) {
    public void testPutDTDHash_Null_DTD() throws IOException {
        try {
            fail("NullPointerException is thrown"); 
        } catch (NullPointerException e) {
HARMONY output:
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r450941, (Sep 28 2006), Windows/ia32/msvc 1310, release build
Time: 0.032
There were 2 errors:
1) testGetDTD_Null(test)java.lang.IllegalArgumentException: Name must be not null
        at javax.swing.text.html.parser.DTD.checkName(DTD.java:79)
        at javax.swing.text.html.parser.DTD.getDTD(DTD.java:63)
        at test.testGetDTD_Null(test.java:14)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)

2) testPutDTDHash_Null_DTD(test)java.lang.IllegalArgumentException: Name must benot null
        at javax.swing.text.html.parser.DTD.checkName(DTD.java:79)
        at javax.swing.text.html.parser.DTD.putDTDHash(DTD.java:75)
        at test.testPutDTDHash_Null_DTD(test.java:17)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
Tests run: 2,  Failures: 0,  Errors: 2

SUN output:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
Time: 0.01
OK (2 test)

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message