Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261307

AreaAveragingScaleFilter(int, int): IAE is not specified

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
      2d
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      No behavior change - specification only so minimal risk
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Specify that java.awt.image.AreaAveragingScaleFilter(int, int) will throw IllegalArgumentException when passed 0 for width or height parameter.

      Problem

      Constructor AreaAveragingScaleFilter(int, int) of the java.awt.image.AreaAveragingScaleFilter class throws IllegalArgumentException when 0 is passed as value to width or height parameterbut it is not specified in the specification.

      Solution

      Update the specification to document that IllegalArgumentException will be thrown for 0 value passed to AreaAveragingScaleFilter(int width, int height).

      Specification

      src/java.desktop/share/classes/java/awt/image/AreaAveragingScaleFilter.java
      
           /**
            * Constructs an AreaAveragingScaleFilter that scales the pixels from
            * its source Image as specified by the width and height parameters.
            * @param width the target width to scale the image
            * @param height the target height to scale the image
      +     * @throws IllegalArgumentException if {@code width} equals
      +     *         zero or {@code height} equals zero
            */
           public AreaAveragingScaleFilter(int width, int height) {
               super(width, height);
           }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psadhukhan Prasanta Sadhukhan
              Reporter:
              ydanilev Yury Danilevich (Inactive)
              Reviewed By:
              Sergey Bylokhov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: