On Sun, 22 May 2022 09:08:03 GMT, Jeremy <d...@openjdk.java.net> wrote:

> This resolves an occasional unit test failure in Path2D.UnitTest.
> 
> The previous Path2D#getBounds2D(PathIterator) implementation assumed that 
> after a SEG_CLOSE the next segment would always be a SEG_MOVETO to start a 
> new clearly defined segment. But the Path2D.UnitTest created random paths 
> that didn't follow this expectation.
> 
> This commit updates #getBounds2D(PathIterator) so it will move the cursor 
> back to the (moveX, moveY) point for the sake of calculating future segments. 
> This appears to resolve the unit test failures.
> 
> This commit also modifies the unit test so it logs random seeds. This may 
> help developers isolate/reproduce specific failures with more certainty.

This pull request has now been integrated.

Changeset: 5848a60c
Author:    jeremy <jeremy.w...@mac.com>
Committer: Laurent Bourgès <lbour...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/5848a60c01747728cbdde1e9d8a244079fd88c14
Stats:     68 lines in 2 files changed: 37 ins; 5 del; 26 mod

8286093: java/awt/geom/Path2D/UnitTest.java failed with "RuntimeException: 2D 
bounds too small"

Reviewed-by: prr

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

PR: https://git.openjdk.java.net/jdk/pull/8828

Reply via email to