You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ilya Okomin (JIRA)" <ji...@apache.org> on 2006/12/26 12:40:21 UTC

[jira] Created: (HARMONY-2877) [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null

[classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null
---------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2877
                 URL: http://issues.apache.org/jira/browse/HARMONY-2877
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ilya Okomin
            Priority: Minor


java.awt.image.Raster.createRaster(SampleModel sm, DataBuffer db, Point location) doesn't throw RasterFormatException if location param is null while RI does.
Spec doesn't consider this case.
Run next test case to see the difference, it passes on RI and fails on Harmony:

------------- test.java ----------------
import java.awt.image.DataBufferUShort;
import java.awt.image.Raster;
import java.awt.image.RasterFormatException;
import java.awt.image.SinglePixelPackedSampleModel;

import junit.framework.TestCase;
import junit.textui.TestRunner;

public class test extends TestCase {

    public static void main(String args[]) {
        TestRunner.run(test.class);
    }

    public void testRun() {
        int[] array0 = new int[405];
        SinglePixelPackedSampleModel sm = new SinglePixelPackedSampleModel(0,
                127, 2, array0);
        short[] array1 = new short[758];
        DataBufferUShort localDataBufferUShort = new DataBufferUShort(array1, 223);
        try {
            Raster localRaster = Raster.createRaster(sm, localDataBufferUShort, null);
            fail("RasterFormatException expected");
        } catch (RasterFormatException expectedException) {
            // expected
        }
    }
}
------------------------------------------

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2877) [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko reassigned HARMONY-2877:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2877
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2877
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>
> java.awt.image.Raster.createRaster(SampleModel sm, DataBuffer db, Point location) doesn't throw RasterFormatException if location param is null while RI does.
> Spec doesn't consider this case.
> Run next test case to see the difference, it passes on RI and fails on Harmony:
> ------------- test.java ----------------
> import java.awt.image.DataBufferUShort;
> import java.awt.image.Raster;
> import java.awt.image.RasterFormatException;
> import java.awt.image.SinglePixelPackedSampleModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         int[] array0 = new int[405];
>         SinglePixelPackedSampleModel sm = new SinglePixelPackedSampleModel(0,
>                 127, 2, array0);
>         short[] array1 = new short[758];
>         DataBufferUShort localDataBufferUShort = new DataBufferUShort(array1, 223);
>         try {
>             Raster localRaster = Raster.createRaster(sm, localDataBufferUShort, null);
>             fail("RasterFormatException expected");
>         } catch (RasterFormatException expectedException) {
>             // expected
>         }
>     }
> }
> ------------------------------------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-2877) [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Petrenko closed HARMONY-2877.
------------------------------------

    Resolution: Fixed

Fixed as part of HARMONY-2884.

> [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2877
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2877
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>         Assigned To: Alexey Petrenko
>            Priority: Minor
>
> java.awt.image.Raster.createRaster(SampleModel sm, DataBuffer db, Point location) doesn't throw RasterFormatException if location param is null while RI does.
> Spec doesn't consider this case.
> Run next test case to see the difference, it passes on RI and fails on Harmony:
> ------------- test.java ----------------
> import java.awt.image.DataBufferUShort;
> import java.awt.image.Raster;
> import java.awt.image.RasterFormatException;
> import java.awt.image.SinglePixelPackedSampleModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         int[] array0 = new int[405];
>         SinglePixelPackedSampleModel sm = new SinglePixelPackedSampleModel(0,
>                 127, 2, array0);
>         short[] array1 = new short[758];
>         DataBufferUShort localDataBufferUShort = new DataBufferUShort(array1, 223);
>         try {
>             Raster localRaster = Raster.createRaster(sm, localDataBufferUShort, null);
>             fail("RasterFormatException expected");
>         } catch (RasterFormatException expectedException) {
>             // expected
>         }
>     }
> }
> ------------------------------------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2877) [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov updated HARMONY-2877:
-------------------------------------

    Patch Info: [Patch Available]

> [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2877
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2877
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>            Priority: Minor
>
> java.awt.image.Raster.createRaster(SampleModel sm, DataBuffer db, Point location) doesn't throw RasterFormatException if location param is null while RI does.
> Spec doesn't consider this case.
> Run next test case to see the difference, it passes on RI and fails on Harmony:
> ------------- test.java ----------------
> import java.awt.image.DataBufferUShort;
> import java.awt.image.Raster;
> import java.awt.image.RasterFormatException;
> import java.awt.image.SinglePixelPackedSampleModel;
> import junit.framework.TestCase;
> import junit.textui.TestRunner;
> public class test extends TestCase {
>     public static void main(String args[]) {
>         TestRunner.run(test.class);
>     }
>     public void testRun() {
>         int[] array0 = new int[405];
>         SinglePixelPackedSampleModel sm = new SinglePixelPackedSampleModel(0,
>                 127, 2, array0);
>         short[] array1 = new short[758];
>         DataBufferUShort localDataBufferUShort = new DataBufferUShort(array1, 223);
>         try {
>             Raster localRaster = Raster.createRaster(sm, localDataBufferUShort, null);
>             fail("RasterFormatException expected");
>         } catch (RasterFormatException expectedException) {
>             // expected
>         }
>     }
> }
> ------------------------------------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.