What happened to JAXB's NamespacePrefixMapper in JDK6u18

后端 未结 7 965
粉色の甜心
粉色の甜心 2020-12-08 19:44

I\'ve been using com.sun.xml.bind.marshaller.NamespacePrefixMapper in my project, and i had no problem with it in JDK 6u17. Now I just updated to 6u18, and I sa

7条回答
  •  无人及你
    2020-12-08 20:17

    Sun had made something not quite appropriate in this case. The namespace mapper isn't included in the spec, but it is "advertised" as a way to customize prefixes. So the general advice "don't use com.sun.*" doesn't apply here, and the javadoc of this class says:

    Implemented by the user application to determine URI -> prefix mapping.

    Check this article and see if it would work for you.

提交回复
热议问题