edu.umd.cs.findbugs.detect

Class FindUselessControlFlow

public class FindUselessControlFlow extends BytecodeScanningDetector implements StatelessDetector

A Detector to look for useless control flow. For example,
     if (argv.length == 1);
         System.out.println("Hello, " + argv[0]);
 
In this kind of bug, we'll see an ifcmp instruction where the IF target is the same as the fall-through target.

The idea for this detector came from Richard P. King, and the idea of looking for if instructions with identical branch and fall-through targets is from Mike Fagan.

Author: David Hovemeyer

Constructor Summary
FindUselessControlFlow(BugReporter bugReporter)

Constructor Detail

FindUselessControlFlow

public FindUselessControlFlow(BugReporter bugReporter)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.