Skip to content

Commit

Permalink
Use the new NoContractsFromMethod (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl authored Aug 23, 2024
1 parent fc545a8 commit eea8585
Showing 1 changed file with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,10 @@
import org.checkerframework.framework.type.typeannotator.TypeAnnotator;
import org.checkerframework.framework.type.visitor.AnnotatedTypeVisitor;
import org.checkerframework.framework.util.AnnotationFormatter;
import org.checkerframework.framework.util.Contract.ConditionalPostcondition;
import org.checkerframework.framework.util.Contract.Postcondition;
import org.checkerframework.framework.util.Contract.Precondition;
import org.checkerframework.framework.util.ContractsFromMethod;
import org.checkerframework.framework.util.DefaultAnnotationFormatter;
import org.checkerframework.framework.util.DefaultQualifierKindHierarchy;
import org.checkerframework.framework.util.NoContractsFromMethod;
import org.checkerframework.framework.util.QualifierKindHierarchy;
import org.checkerframework.framework.util.defaults.QualifierDefaults;
import org.checkerframework.javacutil.AnnotationBuilder;
Expand Down Expand Up @@ -1037,23 +1035,7 @@ public boolean applyConservativeDefaults(Element annotationScope) {
// Disable checking of contracts.
@Override
protected ContractsFromMethod createContractsFromMethod() {
return new ContractsFromMethod(this) {
@Override
public Set<ConditionalPostcondition> getConditionalPostconditions(
ExecutableElement methodElement) {
return emptySet();
}

@Override
public Set<Precondition> getPreconditions(ExecutableElement executableElement) {
return emptySet();
}

@Override
public Set<Postcondition> getPostconditions(ExecutableElement executableElement) {
return emptySet();
}
};
return new NoContractsFromMethod();
}

@Override
Expand Down

0 comments on commit eea8585

Please sign in to comment.