All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.LGO_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

There is a newer version: 7.6.8
Show newest version
package ex;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;

public class LGO_Sample {

    public void testCreate(Graphics g) {
        Graphics g2 = g.create();
    }

    public void testCreateg2D(Graphics g) {
        Graphics2D g2 = (Graphics2D) g.create();
    }

    public void testBufferedImage(BufferedImage bi) {
        Graphics g = bi.getGraphics();
    }

    public void fpWasDisposed(Graphics g) {
        Graphics g2 = g.create();
        try {

        } finally {
            g2.dispose();
        }
    }

    public void fpG2DWasDisposed(Graphics g) {
        Graphics2D g2 = (Graphics2D) g.create();
        try {

        } finally {
            g2.dispose();
        }
    }

    public Graphics returnG(Graphics g) {
        return g.create();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy