JDK 1.6 and Xerces?

后端 未结 4 1007
轻奢々
轻奢々 2020-12-14 03:49

In my current project, we target a JDK 1.6 Runtime environment. For legacy rasons, Xerces JAR files are bundled in the application.

These are no longer needed right

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-14 04:42

    The parser in the JDK was a fork of Xerces, but it is very buggy. I would recommend production applications always to use the Apache version of the parser in preference. The bugs are rare, but they are unpredictable, and they don't only affect corner cases that aren't seen in real life; I've seen many cases where quite boring XML documents are being parsed, and corrupt data is passed to the application for attribute values. Sun/Oracle have shown no interest in fixing the problem. Use Apache Xerces every time.

    UPDATE (2018)

    The problems with the JDK version of Xerces seem to have been resolved in Java 8, as far as I can see, so this advice is out of date.

提交回复
热议问题