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
[JENKINS-44942] - FilePath.list() & .listDirectories() null safety #2914
Conversation
…was not in fact so. FilePath.list() did not specify, but at least DownloadFromUrlInstaller assumed it was non-null.
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be also great to catch the SecurityException from ListFiles() then. Similarly to jenkinsci/periodicbackup-plugin@466393e
🐝 anyway though it is not full fix
Does not make sense to me. There should not be a |
Not documented anywhere. I also do not see a reason for such no-go answer. Security managers are being widely used on security-paranoid enterprise instances.
Likely yes. The problem is what's going to happen if it does, we may get into undefined behavior due to the runtime exceptions (hanging agents, file leaks, etc.). But I'd guess Anyway, I have approved the PR |
Huh?? You would to patch Jenkins sources to install a security manager. And you will very likely break all kinds of things in the process. Jenkins is designed to assume it has full control over the JVM. |
@reviewbybees done |
Created issue placeholder just in case we decide to backport it: https://issues.jenkins-ci.org/browse/JENKINS-44942 |
[JENKINS-44942] - FilePath.list() & .listDirectories() null safety (cherry picked from commit a5dc255)
Description
No known NPE resulting from this, but better to be on the safe side.
https://issues.jenkins-ci.org/browse/JENKINS-44942
Changelog entries
Proposed changelog entries:
NullPointerException
resulting when listing remote directories using theFilePath#list()
andFilePath#ListDirectories()
API.Desired reviewers
@reviewbybees