-
Notifications
You must be signed in to change notification settings - Fork 80
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
Resolution for issue #70 #87
Conversation
Added checks to make sure the file explorer is returning value outputs. One check ensures it is an image file, the other makes sure a null is not returned which happens when the explorer is closed without selecting a file. Both checks might be able to be condensed down to one check and we might be able to add a GUI popup instead of just a System.out on check failure.
No need to have an else block. If the user cancels out of the file explorer they don't need to be told they did so.
Fixed both reported bugs involving the file explorer
The bug report for trying to open a none image file was rejected. Removing lines to check file extension.
The bug report for trying to open a none image file was rejected. Removing lines to check file extension.
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.
@KyleKing54
There is a method for filtering filetypes setFilenameFilter() as well as an open issue which will hopefully resolve how we should handle allowed filetypes and maybe even what to do if the files have the right extensions but wrong encoding. #83 and #69
I would recommend placing the if statement before assignment of theFile and then checking the condition of fd.getFile() == null
The else statements provide stdout but this is a GUI program.
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.
Please indicate (in a comment) the tests that were run to demonstrate that this PR satisfies issue #70.
Removed debugging on line 293
Removed debugging on line 293 that is no longer in use.
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.
Looks great!
Please update the version number by adding a digit to make the file version distinct (1.8.3.1
).
Then please squash all the individual commits.
After this, I believe we're good to go!
The program becomes unresponsive after closing the file explorer to select an image file without selecting a file. Added a check to make sure the explorer does not return a null value before attempting to process the image further, preventing the program from freezing up when you click cancel.