-
Notifications
You must be signed in to change notification settings - Fork 125
FileSink constructor should guard against empty/whitespace paths #287
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
Comments
if it needs fixing ill be happy to do that :) |
Hi @reubenalfred! |
|
If it is null or white space it won't create the directory sure but it will still attempt to execute the rest of the code without a definite directory. path too should be tested for null or white space at the top instead of just testing for null alone. |
Where is the action specified? Please show me?? |
ah got it. Yes, I thought you mean the create directory part.
Yes, would be an improvement.
do it ... I would be surprised if the team here turns down the help. |
Cool will do that, I personally like to test for obvious and explicitly throw exceptions rather than rely on the API's otherwise it is too much to remember what throws what! |
@reubenalfred I'm spring cleaning (e.g. #297 (comment) #263 (comment)) Before any work takes place to add checks, it'd be good for us to collectively get #258 over the line, as it may already be address some of these issues. In short, as:
The next steps here are to make sure your concerns are covered by either |
Hi,
I was just browsing the FileSink file and noticed that the path parameter is only tested for null and doesn't include a test for NullOrWhiteSpace.
Further down in the constructor, it is tested to see if the path's dir is null or white space and creates the directory if the path string is valid, however, no action is specified when the string is empty.
it is an internal constructor, perhaps it may not be that important. i thought i'd let you know...
regards, reuben
The text was updated successfully, but these errors were encountered: