未验证 提交 ca6361e2 编写于 作者: O Oleg Nenashev 提交者: GitHub

Update FilePath.java

上级 dca272db
...@@ -2031,14 +2031,13 @@ public final class FilePath implements Serializable { ...@@ -2031,14 +2031,13 @@ public final class FilePath implements Serializable {
*/ */
public String readToString() throws IOException, InterruptedException { public String readToString() throws IOException, InterruptedException {
return act(new ReadToString()); return act(new ReadToString());
} }
private final class ReadToString extends SecureFileCallable<String> { private final class ReadToString extends SecureFileCallable<String> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Override @Override
public String invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { public String invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
return new String(Files.readAllBytes(fileToPath(reading(f)))); return new String(Files.readAllBytes(fileToPath(reading(f))));
} }
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册