01: /*
02: * Created on 27.02.2004
03: *
04: * To change the template for this generated file go to
05: * Window - Preferences - Java - Code Generation - Code and Comments
06: */
07: package org.hammurapi.inspectors;
08:
09: import org.hammurapi.InspectorBase;
10:
11: import com.pavelvlasov.jsel.expressions.MethodCall;
12: import com.pavelvlasov.review.SourceMarker;
13:
14: /**
15: * @author mucbj0, modified by c8982
16: *
17: * To change the template for this generated type comment go to
18: * Window - Preferences - Java - Code Generation - Code and Comments
19: */
20: public class SystemGcMisuseRule extends InspectorBase {
21:
22: public void visit(MethodCall methodCall) {
23: if ("System.gc(".equals(methodCall.toString())) {
24: context.reportViolation((SourceMarker) methodCall);
25: }
26: }
27: }
|