Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.sf.alchim.codeplus.spoonchecker;
 
Report warnings when empty catch blocks are found.
 
public class CatchProcessor extends AbstractProcessor<CtCatch> {
    public void process(CtCatch element) {
        if (element.getBody().getStatements().size() == 0) {
            getFactory().getEnvironment().report(this.,
                    element"empty catch clause");
        }
    }
New to GrepCode? Check out our FAQ X