Affects Version/s: 5.4.6
Fix Version/s: None
A non-readable file inside a synced directory such as the $ARTIFACTORY_HOME/etc/plugins dir would cause the file-to-db syncing thread to fail with a NPE - see full stack trace attached.
The fact that the following line is executed within a try-with-resources block causes the FileNotFoundExeption (permissions denied) to be surpassed, and the code within the try block continues to execute:
so "stream" is null, and this causes toByteArray to fail with a NPE.
1.Create a file inside /etc/plugins (i.e touch foo.groovy) while the server is down or if the application is halted with a breakpoint
2.Remove read permissions for this file to whichever user you are using to run the Artifactory process
3.Start the server, observe the NPE on your localhost.log file
This should be considered a high priority issue because it can fail a startup