JDK-8228973 : Default ErrorListener reports warnings and errors to the console
  • Type: CSR
  • Component: xml
  • Sub-Component: javax.xml.transform
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 14
  • Submitted: 2019-08-01
  • Updated: 2019-09-04
  • Resolved: 2019-08-29
Related Reports
CSR :  
Relates :  
Description
Summary
-------

Remove the requirement for the default implementation of javax.xml.transform.ErrorListener to report all warnings and errors to System.err.

Problem
-------

The specification of javax.xml.transform.ErrorListener requires that the default implementation reports all warnings and errors to System.err. This is inappropriate since output to the console or server log (when it is so configured) could go unnoticed or unnecessarily clog the output channel. 


Solution
--------

Remove the requirement.

Specification
-------------

The class-level description of the interface is re-written. The only material change is removing requirement to report all warnings and errors to System.err. 

The package summary is updated to reflect the change. The statement regarding the default ErrorListener implementation is removed in favor of the @implNote in the ErrorListener.

Specdiff attached.

The specdiff can also be viewed here:
http://cr.openjdk.java.net/~joehw/jdk14/8228854/specdiff_05/javax/xml/transform/package-summary.html



Comments
Moving to Approved for JDK 14; thanks.
29-08-2019

Thanks Joe! Updated the spec with moving the implNote to the normal (specification) text. The latest attachment is specdiff_05. The link in the specification section is also updated.
29-08-2019

Text in an @-implNote is just informative rather than normative, per the description in the JEP JDK-8068562. The @-implNote'd text > If an application does not provide a listener, the TransformerFactory > or Transformer sshall create one on its own. The default ErrorListener > may use this mechanism to report XML parsingtake no action for > warnings and recoverable errors as well as, and allow the > transformation errorsto continue. However, the TransformerFactory or > Transformer may still throw TransformerException when it decides it > can not continue processing. read to me as if it should be normative (that is specification text) rather than just an informative note. Accordingly, I would recommend this text be put under a normative @-implSpec section or just normal (specification) text. Moving to Provisional.
28-08-2019

With this enhancement request, we intend to focus on the ErrorListener specification, keeping the scope narrow and incompatibility low. We'll leave other issues, for example JDK-8229005, as separate issues.
08-08-2019