URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13459>

                 Summary: Null check after dereference in
java.awt.image.ConvolveOp
                 Project: classpath
            Submitted by: daveho
            Submitted on: Sat 06/18/2005 at 21:30
                Category: classpath
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: None

    _______________________________________________________

Details:

In classpath-0.15:

In class java.awt.image.ConvolveOp, at line 191, is
the following code:

  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() ||
        src.getHeight() < kernel.getHeight())
      throw new ImagingOpException(null);
    
    if (dest == null)
      dest = createCompatibleDestRaster(src);

The check "dest == null" cannot be true because dest was
dereferenced on the first line of the method.
That check should probably be modified so that it does not
happen if dest is null.

Found by FindBugs, http://findbugs.sourceforge.net







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13459>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Commit-classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-classpath

Reply via email to