JDK-8279297 : Remove Shape::setMode method
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: openjfx17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2021-12-24
  • Updated: 2022-09-12
  • Resolved: 2022-07-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx19Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
There is an obvious problem in the following source file

* jfx/modules/javafx.graphics/src/main/java/javafx/scene/shape/Shape.java

    void setMode(NGShape.Mode mode) {
        mode = mode; // -> this.mode = mode;
    }

This implementation is considered to be working differently than expected.

If you fix this issue, you will be able to use the test I attached in JDK-8229264
The COPY mode of the blend mode works correctly.
I have confirmed this.




STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. run the tests attached to JDK-8229264
Check the rendering result of COPY mode. 2.

The following screenshot may be helpful.
* https://github.com/javafxports/openjdk-jfx/issues/552

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Background is not filled with black

ACTUAL -
Background is filled with black


---------- BEGIN SOURCE ----------
Use the attached test for JDK-8229264
---------- END SOURCE ----------

FREQUENCY : always



Comments
Changeset: 28b8220e Author: Andy Goryachev <andy.goryachev@oracle.com> Committer: Nir Lisker <nlisker@openjdk.org> Date: 2022-07-07 14:19:15 +0000 URL: https://git.openjdk.org/jfx/commit/28b8220e051620674f247c22a217bb9590d103a2
07-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jfx/pull/814 Date: 2022-07-06 18:12:42 +0000
06-07-2022

Yes, this is clearly a bad assignment. As a result, the setMode method in Shape does nothing. The only reason that it isn't causing any problems is that the setMode method is unused; the mode field is instead computed and set in the checkModeChanged method. The best fix for this bug is to remove the unused setMode method from Shape and ShapeHelper. Note that this is not the cause of JDK-8229264, nor is it related in any way to that bug, in spite of the comment in the description.
03-01-2022

Moving to JDK for Dev team's review.
28-12-2021