Fixes https://bugs.openjdk.org/browse/JDK-8330462.

If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then 
an addition of `start` to it leads to a negative value. This is "fixed" by 
using `Math.max` comparing the `maxLength` and `maxLength + start`.

-------------

Commit messages:
 - 8330462: StringIndexOutOfBoundException when typing anything into TextField

Changes: https://git.openjdk.org/jfx/pull/1442/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1442&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8330462
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jfx/pull/1442.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1442/head:pull/1442

PR: https://git.openjdk.org/jfx/pull/1442

Reply via email to