DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12374>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12374 TCK: Transformer.setErrorListener(null) does not throw IllegalArgumentException Summary: TCK: Transformer.setErrorListener(null) does not throw IllegalArgumentException Product: XalanJ2 Version: CurrentCVS Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.transformer AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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
