提交 c20ae41e authored 作者: Thomas Mueller's avatar Thomas Mueller

Improve code coverage.

上级 4a489638
...@@ -129,7 +129,7 @@ public class FileSystemMemory extends FileSystem { ...@@ -129,7 +129,7 @@ public class FileSystemMemory extends FileSystem {
public String normalize(String fileName) { public String normalize(String fileName) {
fileName = fileName.replace('\\', '/'); fileName = fileName.replace('\\', '/');
int idx = fileName.indexOf(':') + 1; int idx = fileName.indexOf(':') + 1;
if (fileName.length() >= idx && fileName.charAt(idx) != '/') { if (fileName.length() > idx && fileName.charAt(idx) != '/') {
fileName = fileName.substring(0, idx) + "/" + fileName.substring(idx); fileName = fileName.substring(0, idx) + "/" + fileName.substring(idx);
} }
return fileName; return fileName;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论