[ http://issues.apache.org/jira/browse/XALANJ-1170?page=all ]
     
Morris Kwan closed XALANJ-1170:
-------------------------------

    Assign To:     (was: Xalan Developers Mailing List)

> TCK: Transformer.setErrorListener(null) does not throw 
> IllegalArgumentException
> -------------------------------------------------------------------------------
>
>          Key: XALANJ-1170
>          URL: http://issues.apache.org/jira/browse/XALANJ-1170
>      Project: XalanJ2
>         Type: Bug
>   Components: transformation, Xalan-interpretive
>     Versions: Latest Development Code
>  Environment: Operating System: All
> Platform: All
>     Reporter: Morris Kwan

>
> This is the first of the series of problems uncovered by the JAXP 1.2 TCK 
> test 
> suite.
> According to the Javadoc, Transformer.setErrorListener(ErrorListener 
> listener) 
> should throw an IllegalArgumentException if the error listener is null. The 
> setErrorListener interface in TransformerImpl does throw an exception. 
> However, 
> setErrorListener in TransformerIdentityImpl does not throw an exception.
> Code to demonstrate the problem:
> --------------------------------
> import javax.xml.transform.*;
> public class ErrorListenerTest
> {
>    public static void main(String[] args)
>    {
>         try {
>             Transformer transformer = TransformerFactory.newInstance
> ().newTransformer();
>     
>             transformer.setErrorListener(null);
>             System.out.println("Error: IllegalArgumentException not thrown");
>         } 
>         catch (IllegalArgumentException e) {
>             System.out.println("OK: IllegalArgumentException is thrown");
>         }
>         catch (TransformerException e) {
>             System.out.println("Error: TransformerException is thrown");
>         }
>     }
> }
> -------------------------------------------------------------------------
> Expected output: 
> OK: IllegalArgumentException is thrown
> Current output:
> Error: IllegalArgumentException not thrown

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to