diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7af63409..cf6cdf4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,6 +50,7 @@ jobs: - name: Install Python dependencies run: | python3 -m pip install --upgrade pip + pip install --upgrade setuptools wheel if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Spotless Check if: matrix.jdk == 11 || matrix.jdk == 17 diff --git a/src/checkers/inference/InferenceAnnotatedTypeFactory.java b/src/checkers/inference/InferenceAnnotatedTypeFactory.java index d2e7a975..fdfdda0b 100644 --- a/src/checkers/inference/InferenceAnnotatedTypeFactory.java +++ b/src/checkers/inference/InferenceAnnotatedTypeFactory.java @@ -512,9 +512,8 @@ protected void applyInferredAnnotations( * This is the same as the super method, but we do not want to use defaults or typeAnnotator. */ @Override - protected void addComputedTypeAnnotations( - Tree tree, AnnotatedTypeMirror type, boolean iUseFlow) { - assert root != null + protected void addComputedTypeAnnotations(Tree tree, AnnotatedTypeMirror type) { + assert getRoot() != null : "GenericAnnotatedTypeFactory.annotateImplicit: " + " root needs to be set when used on trees; factory: " + this.getClass(); @@ -527,7 +526,7 @@ protected void addComputedTypeAnnotations( // typeAnnotator.visit(type, null); defaults.annotate(tree, type); - if (iUseFlow) { + if (getUseFlow()) { CFValue as = getInferredValueFor(tree); if (as != null) { applyInferredAnnotations(type, as); diff --git a/src/checkers/inference/util/defaults/InferenceQualifierDefaults.java b/src/checkers/inference/util/defaults/InferenceQualifierDefaults.java index 36c36067..83c5ff02 100644 --- a/src/checkers/inference/util/defaults/InferenceQualifierDefaults.java +++ b/src/checkers/inference/util/defaults/InferenceQualifierDefaults.java @@ -74,9 +74,8 @@ public void applyDefault(Default def) { } @Override - protected boolean shouldBeAnnotated(AnnotatedTypeMirror type, boolean applyToTypeVar) { - return super.shouldBeAnnotated(type, applyToTypeVar) - && !type.hasAnnotation(VarAnnot.class); + protected boolean shouldBeAnnotated(AnnotatedTypeMirror type) { + return super.shouldBeAnnotated(type) && !type.hasAnnotation(VarAnnot.class); } } } diff --git a/src/sparta/checkers/SimpleFlowAnnotatedTypeFactory.java b/src/sparta/checkers/SimpleFlowAnnotatedTypeFactory.java index 3d99b856..11629ac4 100644 --- a/src/sparta/checkers/SimpleFlowAnnotatedTypeFactory.java +++ b/src/sparta/checkers/SimpleFlowAnnotatedTypeFactory.java @@ -233,11 +233,10 @@ protected void addCheckedCodeDefaults(QualifierDefaults defaults) { } @Override - protected void addComputedTypeAnnotations( - Tree tree, AnnotatedTypeMirror type, boolean useFlow) { + protected void addComputedTypeAnnotations(Tree tree, AnnotatedTypeMirror type) { Element element = TreeUtils.elementFromTree(tree); handleDefaulting(element, type); - super.addComputedTypeAnnotations(tree, type, useFlow); + super.addComputedTypeAnnotations(tree, type); } @Override