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 hudson.security.ACLContext;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import jenkins.util.SystemProperties;
|
||||
import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
|
||||
@@ -278,7 +279,7 @@ public class WebAppMain implements ServletContextListener {
|
||||
private void recordBootAttempt(File home) {
|
||||
try (OutputStream o=Files.newOutputStream(BootFailure.getBootFailureFile(home).toPath(), StandardOpenOption.CREATE, StandardOpenOption.APPEND)) {
|
||||
o.write((new Date().toString() + System.getProperty("line.separator", "\n")).toString().getBytes());
|
||||
} catch (IOException e) {
|
||||
} catch (IOException | InvalidPathException e) {
|
||||
LOGGER.log(WARNING, "Failed to record boot attempts",e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user