On Thu, 25 Mar 2021 12:29:38 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

> Simple fix to add a missing closing bracket to `PickResult::toString`. This 
> includes a unit test that fails without the fix and passes with the fix.

modules/javafx.graphics/src/main/java/javafx/scene/input/PickResult.java line 
204:

> 202:         }
> 203:         if (getIntersectedTexCoord() != null) {
> 204:                 sb.append(", texCoord = 
> ").append(getIntersectedTexCoord());

Can you fix the double indentation in the `if` bodies?

modules/javafx.graphics/src/test/java/test/javafx/scene/input/MouseEventTest.java
 line 139:

> 137:                 case ']':
> 138:                     --bracketCount;
> 139:                     assertTrue("Too many closing brackets: " + str, 
> bracketCount >= 0);

This test can fail due to a malformed `toString` result in the node 
(`getIntersectedNode()`), which I would think is outside the scope of this 
test. In practice, this test's result is dependent on what node I choose to 
test.

Shouldn't we be testing the structure of the string and not its contents?

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

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

Reply via email to