Skip to content
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

Closed
wants to merge 8 commits into from

Conversation

KyleKing54
Copy link

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.

KyleKing54 and others added 5 commits October 12, 2021 21:46
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.
@KyleKing54 KyleKing54 marked this pull request as ready for review October 14, 2021 03:38
Copy link

@jbae-89 jbae-89 left a 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.

Copy link
Contributor

@jody jody left a 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.

imagelab/ImageLab.java Outdated Show resolved Hide resolved
Copy link
Contributor

@jody jody left a 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!

@jody jody self-requested a review October 17, 2021 00:10
@jody jody closed this Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Cancelling out of "Open Image" file explorer makes the program unresponsive
4 participants