Bug in JDK
2011-04-06 18:00
225 查看
在JDK中, DocumentBuilder类的其中一个parse方法如下。
我认为如果在文件路径中包含如日文中文,这个函数无法正常工作。
What do you guys think?
public Document
parse(File f) throws SAXException, IOException
{
if (f == null) {
throw new
IllegalArgumentException("File cannot be null");
}
//convert
file to appropriate URI, f.toURI().toASCIIString()
//converts the
URI to string as per rule specified in
//RFC
2396,
InputSource
in = new InputSource(f.toURI().toASCIIString());
return parse(in);
}
各位如果有不同意见可以跟帖。
我认为如果在文件路径中包含如日文中文,这个函数无法正常工作。
What do you guys think?
public Document
parse(File f) throws SAXException, IOException
{
if (f == null) {
throw new
IllegalArgumentException("File cannot be null");
}
//convert
file to appropriate URI, f.toURI().toASCIIString()
//converts the
URI to string as per rule specified in
//RFC
2396,
InputSource
in = new InputSource(f.toURI().toASCIIString());
return parse(in);
}
各位如果有不同意见可以跟帖。
相关文章推荐
- eclipse bug之No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK
- Eclipse is running in a JRE, but a JDK is required 解决方法
- Maven No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 问题
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- Install JDK in Windows
- Coder-Strike 2014 - Finals (online edition, Div. 2) D.Bug in Code
- CF 421D--Bug in code
- Deepin linux 安装JDK的方法
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- bug之java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class
- bug in MFC Ocx BEGIN_DISPATCH_MAP
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK问题解决
- Codeforces 421D Bug in Code(思维)
- maven 报Unable to locate the Javac Compiler in: D:\Program Files\Java\jdk1.6.0_20\..\lib\tools.jar
- 一起来测试JDK/JRE中FileWriter的bug!!
- A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Ecl
- 深度Deepin linux 2014.1 安装jdk
- fw:jdk install in redhat
- How to install JDK in AIX?
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?