JDK-6472193 : Stax API is not 1.5 ready
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Future Project
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-09-19
  • Updated: 2012-06-09
  • Resolved: 2010-09-09
Description
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b93)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b93, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
The Stax API uses raw types in its API :

In XMLEventFactory :
  - createStartElement(QName,Iterator,Iterator);
   =>   createStartElement(QName,Iterator<Attribute>,Iterator<Namespace>);

  - idem for, createStartElement(String prefix,
                                         String namespaceUri,
                                          String localName,
                                          Iterator<Attribute> attributes,
                                           Iterator<Namespace> namespaces
                                          );
   - createEndElement(QName name, Iterator<Namespace> namespaces);
   - createEndElement(String prefix,
                                         String namespaceUri,
                                         String localName,
                                          Iterator<Namespace> namespaces)

In XMLEventReader, XMLEventReader must inherit from Iterator<XMLEvent>,
this change must be done now because it's not a backward compatible change !!

Futhermore, XMLStreamException is not 1.4 ready because the exception
doesn't use the cause mecanism, it's important to avoid headache when debugging.

see this thread for more detail :
http://forums.java.net/jive/thread.jspa?threadID=18374&tstart=0


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
use the API

REPRODUCIBILITY :
This bug can be reproduced always.

Comments
EVALUATION JSR 173 is a more appropriate forum for these suggestions.
2010-09-09

EVALUATION Contribution forum : https://jdk-collaboration.dev.java.net/servlets/ProjectForumMessageView?forumID=1463&messageID=15680
2006-09-26