我收到此警告:com.sun.org.apache.xml.internal.serialize.OutputFormat是Sun专有的API,将来的发行版中可能会删除它。 [英] I have got this warning: com.sun.org.apache.xml.internal.serialize.OutputFormat is Sun proprietary API and may be removed in a future release

查看:175
本文介绍了我收到此警告:com.sun.org.apache.xml.internal.serialize.OutputFormat是Sun专有的API,将来的发行版中可能会删除它。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码是

 OutputFormat wOf = new OutputFormat( "XML", "ISO-8859-1", true );

帮助我解决此警告...。

help me to solve this warning....

预先感谢

推荐答案

一种解决方案是不使用该类。

One solution is to not use that class.

另一种解决方案是忽略警告。在课堂上,我怀疑这是唯一可行的解​​决方案……如果您坚持使用Sun XML堆栈。

Another solution is to ignore the warning. Looking at the class, I suspect that this is the only viable solution ... if you stick with the Sun XML stack.

(FWIW-这似乎是一个错误Sun在将Apache XML堆栈集成到Java SE中的过程中,该类应放在不会触发此警告的其他程序包中。原始Apache版本显然不打算仅供内部使用。另一种解释是,这是不是错误,而是Oracle打算在将来的发行版中通过提供更好的API来控制XML格式而修复的问题。)

(FWIW - this looks like a mistake on Sun's part in integrating the Apache XML stack into Java SE. The class should be in a different package that doesn't trigger this warning. The original Apache version is clearly not intended to be "internal use only". Another interpretation is that this is not a mistake, but something that Oracle intends to fix in a future release by providing a better API for controlling XML formatting.)

这篇关于我收到此警告:com.sun.org.apache.xml.internal.serialize.OutputFormat是Sun专有的API,将来的发行版中可能会删除它。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆