Menu

#266 PCMLSaxParser Error

PCML
closed-fixed
None
5
2007-08-29
2007-08-21
Anonymous
No

Hello,

I want to notify that the PCMLSaxParser class has a bug, when someone tries to parser a XPCML from a InputStream using the following constructor method:

PcmlSAXParser(String docName, InputStream docStream, ClassLoader loader, InputStream xsdStream, boolean isXPCML)throws MissingResourceException, IOException, ParseException, PcmlSpecificationException, FactoryConfigurationError,ParserConfigurationException,SAXException

the following line throws a NullPointer Exception:

parser.parse(new InputSource(bis),this); //@E0C

because the startElement method don't know that the document is a XPCML, the attribute isXPCML is setted in false from starting, but never changed, so, it tries to parser a PCML document.

It's necessary to set the following instruction in that
constructor method:

this.isXPCML = isXPCML;

I download the source code, and probe the change, and it works, please let me know this issue.

The java file is attached to this ticket

Thanks.

Discussion

  • Nobody/Anonymous

    PcmlSAXParser changed

     
  • Kim Button

    Kim Button - 2007-08-29

    Logged In: YES
    user_id=1215462
    Originator: NO

    Thank you for bringing this to our attention. I have commited a fix to PcmlSAXParser.java into the CVS repository. You can download the updated copy directly from CVS. The fix will be included in the next release of JTOpen.

     
  • Kim Button

    Kim Button - 2007-08-29
    • assigned_to: nobody --> coover-oss
    • status: open --> closed-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    Thank you COOVER-OSS

     

Log in to post a comment.