Class UnnecessaryMath

All Implemented Interfaces:
Detector, Priorities, StatelessDetector, Cloneable, org.apache.bcel.classfile.Visitor

public class UnnecessaryMath extends BytecodeScanningDetector implements StatelessDetector
Find occurrences of Math using constants, where the result of the calculation can be determined statically. Replacing the math formula with the constant performs better, and sometimes is more accurate.
Author:
Dave Brosius