-
Notifications
You must be signed in to change notification settings - Fork 9
Tms 078 #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Tms 078 #51
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/BaseJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/BaseJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/common/VcastUtils.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/NewPipelineJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/NewPipelineJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/NewPipelineJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/BaseJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/BaseJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/NewPipelineJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/NewPipelineJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/job/NewPipelineJob.java
Fixed
Show fixed
Hide fixed
src/main/java/com/vectorcast/plugins/vectorcastexecution/VectorCASTSetup.java
Fixed
Show fixed
Hide fixed
PDM/Jenkins Security/spotbugs changes
FilePath dest = new FilePath( | ||
destScriptDir, fileOrDir); | ||
|
||
if (dest != null) { |
Check warning
Code scanning / CodeQL
Useless null check Warning
dest
new FilePath(...)
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 20 days ago
To fix the problem, we need to remove the redundant null check on the dest
variable. This involves deleting the if (dest != null)
condition and its corresponding closing brace. The rest of the code inside the block should remain unchanged to preserve the existing functionality.
-
Copy modified lines R220-R236
@@ -219,21 +219,19 @@ | ||
destScriptDir, fileOrDir); | ||
|
||
if (dest != null) { | ||
if (entry.isDirectory()) { | ||
dest.mkdirs(); | ||
} else { | ||
FilePath parentDir = dest.getParent(); | ||
if (parentDir != null) { | ||
parentDir.mkdirs(); | ||
try (InputStream is = VectorCASTSetup.class. | ||
getResourceAsStream("/" + entryName)) { | ||
dest.copyFrom(is); | ||
} catch (IOException ex) { | ||
Logger.getLogger(VectorCASTSetup.class | ||
.getName()) | ||
.log(Level.INFO, null, ex); | ||
} | ||
} | ||
} | ||
} | ||
|
||
if (entry.isDirectory()) { | ||
dest.mkdirs(); | ||
} else { | ||
FilePath parentDir = dest.getParent(); | ||
if (parentDir != null) { | ||
parentDir.mkdirs(); | ||
try (InputStream is = VectorCASTSetup.class. | ||
getResourceAsStream("/" + entryName)) { | ||
dest.copyFrom(is); | ||
} catch (IOException ex) { | ||
Logger.getLogger(VectorCASTSetup.class | ||
.getName()) | ||
.log(Level.INFO, null, ex); | ||
} | ||
} | ||
} | ||
} |
Testing done
Standard plugin testing
Submitter checklist