public class IllegalStatementsChecker extends PropertyCollector implements Checker {
// TODO: add checks for break, continue, more?
- private final CompilationUnitTextSelection privateSelection;
-
public IllegalStatementsChecker(CompilationUnitTextSelection selection) {
super(selection);
- privateSelection = selection;
}
@Override
public void check() throws IllegalStatementFoundException, IllegalExpressionFoundException {
- CollectorManager.collectProperties(privateSelection, this);
+ CollectorManager.collectProperties(getSelection(), this);
}
@Override
public class EveryConditionalBranchEndsInReturnCheckerCollector extends PropertyCollector implements Checker {
- private CompilationUnitTextSelection privateSelection;
-
public EveryConditionalBranchEndsInReturnCheckerCollector(CompilationUnitTextSelection selection) {
super(selection);
- privateSelection = selection;
}
@Override
@Override
public void check() throws IllegalStatementFoundException, IllegalExpressionFoundException {
- CollectorManager.collectProperties(privateSelection, this);
+ CollectorManager.collectProperties(getSelection(), this);
}
}
\ No newline at end of file
public class HasWhileOrForOrCatchWithReturnInsideCheckerCollector extends PropertyCollector implements Checker {
private final IllegalReturnStatementChecker hasReturnStatementChecker;
- private CompilationUnitTextSelection privateSelection;
public HasWhileOrForOrCatchWithReturnInsideCheckerCollector(CompilationUnitTextSelection selection) {
super(selection);
- privateSelection = selection;
hasReturnStatementChecker = new IllegalReturnStatementChecker();
}
@Override
public void check() throws IllegalStatementFoundException, IllegalExpressionFoundException {
- CollectorManager.collectProperties(privateSelection, this);
+ CollectorManager.collectProperties(getSelection(), this);
}
@Override