harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-2877) [classlib][awt] Compatibility: java.awt.image.Raster.createRaster() doesn't throw RasterFormatException if location param is null
Date Fri, 02 Mar 2007 07:46:50 GMT

     [ 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.


Mime
View raw message