Skip to content

Commit

Permalink
Null check on FilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
KocproZ committed Sep 3, 2024
1 parent c3a2a47 commit 800931d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ protected Void run() throws Exception {

private InputStream getFileInputStream(String file) throws IOException, InterruptedException {
FilePath ws = getContext().get(FilePath.class);
if (ws == null) {
throw new IllegalStateException("Could not acquire FilePath");

Check warning on line 300 in src/main/java/nz/co/jammehcow/jenkinsdiscord/DiscordPipelineStep.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 299-300 are not covered by tests
}
final FilePath fp = ws.child(file);
if (fp.exists()) {
try {
Expand Down

0 comments on commit 800931d

Please sign in to comment.