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

Doc probs in java.awt.image.DataBufferInt

    Details

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

      Description



      Name: naC79102 Date: 11/29/2000


      Few methods in java.awt.image.DataBufferInt state that the
      number of elements in a datarray must be larger than the
      size specified,to hold the elements.But exception is not thrown if
      the size is increased.

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

       import java.awt.image.DataBufferInt;
       import java.awt.image.DataBuffer;

       public class test {
       public test() {

        try{
              new DataBufferInt(new int[] {2,3,4,5},10);
           System.out.println("ran without error");
              }catch(Exception ee)
              { System.out.println("ran with error");}


        try{
              new DataBufferInt(new int[][] {{2,3},{3,4}},5,new int[]{1,2});
           System.out.println("ran without error");
              }catch(Exception ee)
              { System.out.println("ran with error");}


          try{
              new DataBufferInt(new int[]{1,2,3,4,1,3},2,3);
           System.out.println("ran without error");
              }catch(Exception ee)
              { System.out.println("ran with error");}
        }
       public static void main(String[] args) {
              new test();
      }
      }

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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: