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

ICC_Profile.getInstance(byte[]): IAE is not specified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 17
    • 5.0
    • client-libs
    • None
    • 2d
    • b10
    • generic
    • generic

    Description

      Method getInstance(byte[]) for java.awt.color.ICC_Profile class throws IllegalArgumentException when passed a negative value for a input parameter. Such behavior is not specified either in the member spec or in the package/class description.

      ---------
      import java.awt.color.ICC_Profile;

      public class Test1 {
          public static void main(String[] args) {
              String apiTested = "ICC_Profile.getInstance(byte[]): ";
              String msg = apiTested;
              try {
                  // test case ...
                  byte x[] = {
                      -21, -22, -23
                  };
                  ICC_Profile profile = ICC_Profile.getInstance(x);
                  boolean result = true;
                  msg = apiTested;
                  System.out.println("res: " + result);
              }
              catch(IllegalArgumentException e1) {
                  System.out.println("result (iae): true");
              }
          }
      }
      ###@###.### 2004-12-21 13:18:54 GMT

      Attachments

        Issue Links

          Activity

            People

              serb Sergey Bylokhov
              ydanilev Yury Danilevich (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: