[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: FYI: Fix PR classpath/22999
From: |
Tom Tromey |
Subject: |
[cp-patches] Patch: FYI: Fix PR classpath/22999 |
Date: |
11 Aug 2005 12:25:32 -0600 |
I'm checking this in.
This is a simple fix for a bug found by FindBugs.
I fixed it by reordering the checks.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* java/awt/image/ConvolveOp.java (filter): Defer numBands check
until after null check. PR classpath/22999.
Index: java/awt/image/ConvolveOp.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/image/ConvolveOp.java,v
retrieving revision 1.5
diff -u -r1.5 ConvolveOp.java
--- java/awt/image/ConvolveOp.java 25 Jul 2005 09:54:11 -0000 1.5
+++ java/awt/image/ConvolveOp.java 11 Aug 2005 18:28:08 -0000
@@ -1,5 +1,5 @@
/* ConvolveOp.java --
- Copyright (C) 2004 Free Software Foundation -- ConvolveOp
+ Copyright (C) 2004, 2005 Free Software Foundation -- ConvolveOp
This file is part of GNU Classpath.
@@ -191,8 +191,6 @@
* java.awt.image.WritableRaster)
*/
public WritableRaster filter(Raster src, WritableRaster dest) {
- if (src.numBands != dest.numBands)
- throw new ImagingOpException(null);
if (src == dest)
throw new IllegalArgumentException();
if (src.getWidth() < kernel.getWidth() ||
@@ -201,6 +199,8 @@
if (dest == null)
dest = createCompatibleDestRaster(src);
+ else if (src.numBands != dest.numBands)
+ throw new ImagingOpException(null);
// Deal with bottom edge
if (edge == EDGE_ZERO_FILL)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Patch: FYI: Fix PR classpath/22999,
Tom Tromey <=