mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 20:12:14 +00:00
[JENKINS-43531] Plugins may not be expecting InvalidPathException
- Plugins should really be expecting it, but as historically they have not, may as well convert to IOE for them
This commit is contained in:
1 parent
33942677d4
commit
3871d7778e
31 files changed
+209
-46
No files matched your search
@@ -26,6 +26,7 @@ package hudson;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import jenkins.util.SystemProperties;
|
||||
import hudson.util.DualOutputStream;
|
||||
import hudson.util.EncodingStream;
|
||||
@@ -155,6 +156,8 @@ public class Main {
|
||||
ret = proc.join();
|
||||
|
||||
w.write("</log><result>"+ret+"</result><duration>"+(System.currentTimeMillis()-start)+"</duration></run>");
|
||||
} catch (InvalidPathException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
||||
URL location = new URL(jobURL, "postBuildResult");
|
||||
@@ -173,6 +176,8 @@ public class Main {
|
||||
// send the data
|
||||
try (InputStream in = Files.newInputStream(tmpFile.toPath())) {
|
||||
org.apache.commons.io.IOUtils.copy(in, con.getOutputStream());
|
||||
} catch (InvalidPathException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
||||
if(con.getResponseCode()!=200) {
|
||||
|
||||
Reference in new issue
Block a user