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

Doc probs in java.awt.image.DataBufferUShort

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
      2d
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: naC79102 Date: 12/15/2000


       Exception doesn't rise when size takes a negative value.
                            The constructors that show this bug are
      DataBufferUShort(short[] dataArray, int size) ,DataBufferUShort(short[]
      dataArray, int size, int offset), DataBufferUShort(short[][] dataArray,
      int size) and
      DataBufferUShort(short[][] dataArray, int size, int[] offsets).

       Sample code follows....
       package javasoft.sqe.tests.api.java.awt.java2d.image.DataBufferUShort;

       import java.awt.image.DataBufferUShort;
       import java.awt.image.DataBuffer;

       public class test {
       public test() {

        try{
              new DataBufferUShort(new short[] {2,3,4,5},-10);
              }catch(Exception ee)
              { System.out.println("exception raised");}
        try{
              new DataBufferUShort(new short[] {2,3,4,5},-10,3);
              }catch(Exception ee)
              { System.out.println("exception raised");}


        try{
              new DataBufferUShort(new short[][] {{2,3},{3,4}},-5);
             }catch(Exception ee)
              { System.out.println("exception raised");}

        try{
              new DataBufferUShort(new short[][] {{2,3},{3,4}},-5,new int[]
      {1,2});
             }catch(Exception ee)
              { System.out.println("exception raised");}


      }
       public static void main(String[] args) {
              new test();
                                                            }
      }

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: