Skip to content

fix(selenium): remove redundant close call in try-with-resources block - #702

Open
memmi-konior wants to merge 1 commit into
galasa-dev:mainfrom
memmi-konior:1913/remove-extraclose
Open

fix(selenium): remove redundant close call in try-with-resources block#702
memmi-konior wants to merge 1 commit into
galasa-dev:mainfrom
memmi-konior:1913/remove-extraclose

Conversation

@memmi-konior

Copy link
Copy Markdown

Why?

Refer to issue #1913.
close() gets called twice. Once explicitly via os.close(), while the second one via try-with-resources' auto-close on exit. CouchdbRasWriteByteChannel.close() reads and deletes its own temp file for each call to build a fresh CouchDB upload. The second call fails on a file the first one already deleted.

Changes

  • Removed os.close(); in WebPageImpl.takeScreenShot(), as it is redundant and is potentially what's causing 'takeScreenShot()' to not work in the Ecosystem.

Signed-off-by: Memmi.Konior <MKONIOR@our.ecu.edu.au>
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.

1 participant