This PR fixes the exception thrown by the sample code in [8273324](https://bugs.openjdk.java.net/browse/JDK-8273324), while retaining the incorrect behavior in the scenario described.
--------- ### Progress - [x] Change must not contain extraneous whitespace - [x] Commit message must refer to an issue - [ ] Change must be properly reviewed ### Error ⚠️ The pull request body must not be empty. ### Reviewing <details><summary>Using <code>git</code></summary> Checkout this PR locally: \ `$ git fetch https://git.openjdk.java.net/jfx pull/617/head:pull/617` \ `$ git checkout pull/617` Update a local copy of the PR: \ `$ git checkout pull/617` \ `$ git pull https://git.openjdk.java.net/jfx pull/617/head` </details> <details><summary>Using Skara CLI tools</summary> Checkout this PR locally: \ `$ git pr checkout 617` View PR using the GUI difftool: \ `$ git pr show -t 617` </details> <details><summary>Using diff file</summary> Download this PR as a diff file: \ <a href="https://git.openjdk.java.net/jfx/pull/617.diff">https://git.openjdk.java.net/jfx/pull/617.diff</a> </details> ------------- Commit messages: - fixed IllegalArgumentException Changes: https://git.openjdk.java.net/jfx/pull/617/files Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=617&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273324 Stats: 9 lines in 1 file changed: 6 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jfx/pull/617.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/617/head:pull/617 PR: https://git.openjdk.java.net/jfx/pull/617