Issue : https://bugs.openjdk.java.net/browse/JDK-8193286

Root Cause :
Incorrect implementation.
Current implementation of int wrapValue(int,int,int) in Spinner.java works well 
if min is 0.
Hence this implementation works with ListSpinnerValueFactory, but fails with 
IntegerSpinnerValueFactory.

Fix :
Added a method for IntegerSpinnerValueFactory with separate implementation.

Testing :
Added unit tests to test increment/decrement in multiple steps and with 
different amountToStepBy values.

Also, identified a related behavioral issue 
https://bugs.openjdk.java.net/browse/JDK-8242553, which will be addressed
separately.

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

Commit messages:
 - IntegerSpinner_wrapAround

Changes: https://git.openjdk.java.net/jfx/pull/174/files
 Webrev: https://webrevs.openjdk.java.net/jfx/174/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8193286
  Stats: 202 lines in 3 files changed: 195 ins; 2 del; 5 mod
  Patch: https://git.openjdk.java.net/jfx/pull/174.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/174/head:pull/174

PR: https://git.openjdk.java.net/jfx/pull/174

Reply via email to