This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gui] Boolean and formatting fix
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Cc: Jerry Quinn <jlquinn at optonline dot net>
- Date: Thu, 28 Oct 2004 15:16:12 +0200
- Subject: Re: [gui] Boolean and formatting fix
- References: <4180ED6C.9080206@optonline.net>
Am Donnerstag, 28. Oktober 2004 15:00 schrieb Jerry Quinn:
> 2004-10-28 Jerry Quinn <jlquinn@optonline.net>
>
> * java/awt/image/ColorModel.java (cloneColorModel): Fix line
> wrap. Use Boolean.valueOf.
>
> Index: ColorModel.java
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/java/awt/image/ColorModel.java,v
> retrieving revision 1.13.18.6
> diff -u -r1.13.18.6 ColorModel.java
> --- ColorModel.java 28 Oct 2004 06:08:08 -0000 1.13.18.6
> +++ ColorModel.java 28 Oct 2004 12:57:08 -0000
> @@ -168,11 +168,15 @@
> try {
> // This constructor will exist.
> Constructor ctor =
> - cls.getConstructor(new Class[]{int.class, int[].class,
> ColorSpace.class, - boolean.class, boolean.class,
> int.class, int.class}); - cm =
> (ColorModel)ctor.newInstance(new Object[]{new Integer(pixel_bits),
> bits,
> - cspace, new Boolean(hasAlpha), new
> Boolean(isAlphaPremultiplied), - new
> Integer(transparency), new Integer(transferType)}); +
> cls.getConstructor(new Class[]{int.class, int[].class, +
> ColorSpace.class, boolean.class,
> + boolean.class, int.class, int.class});
> + cm = (ColorModel)ctor.
> + newInstance(new Object[]{new Integer(pixel_bits),
> + bits, cspace, Boolean.valueOf(hasAlpha),
> + Boolean.valueOf(isAlphaPremultiplied),
> + new Integer(transparency),
> + new Integer(transferType)});
> }
> catch (Exception e)
> {
Are you sure this is correct ? boolean.class is not the same as
Boolean.class.
Michael
--
Homepage: http://www.worldforge.org/