JDK-8120197 : Need to specify behavior of out-of-range arguments for WriteableImage constructors
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 7u6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2012-05-25
  • Updated: 2015-06-17
  • Resolved: 2012-06-06
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.
JDK 7
7u6Fixed
Related Reports
Blocks :  
Relates :  
Description
Constructing a WritableImage with a width or height <= 0 with throw an exception in the toolkit:

java.lang.IllegalArgumentException: Image dimensions must be > 0
        at com.sun.prism.Image.<init>(Image.java:135)
        at com.sun.prism.Image.<init>(Image.java:118)
        at com.sun.prism.Image.fromByteBgraPreData(Image.java:44)
        at com.sun.javafx.tk.quantum.QuantumToolkit.createPlatformImage(QuantumToolkit.java:1312)
        at javafx.scene.image.Image.<init>(Image.java:662)
        at javafx.scene.image.WritableImage.<init>(WritableImage.java:70)

This should be documented if this is the desired behavior (which I think it is).

Comments
Fixed with changeset: changeset: 1180:7eb62ef86e4f date: Tue Jun 05 18:58:25 2012 -0700 summary: Fix RT-21831: Specify ranges for WritableImage constructor parameters. This is a doc-only fix so there are no unit tests for this particular fix. The Image Ops unit tests, though, should cover invalid arguments (see RT-21866).
06-06-2012