From 9baba1716665653e9b210c90b837dccd30ad13dc Mon Sep 17 00:00:00 2001 From: Aosen Xiong <82676488+Ao-senXiong@users.noreply.github.com> Date: Sun, 7 Apr 2024 07:55:16 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Werner Dietl --- src/checkers/inference/InferenceValidator.java | 4 +++- src/checkers/inference/InferenceVisitor.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/checkers/inference/InferenceValidator.java b/src/checkers/inference/InferenceValidator.java index ac4acb54..6b39b76c 100644 --- a/src/checkers/inference/InferenceValidator.java +++ b/src/checkers/inference/InferenceValidator.java @@ -40,7 +40,9 @@ public void setInfer(boolean infer) { protected void validateWildCardTargetLocation(AnnotatedTypeMirror.AnnotatedWildcardType type, Tree tree) { InferenceVisitor inferVisitor = (InferenceVisitor) visitor; - if (inferVisitor.ignoreTargetLocations) return; + if (inferVisitor.ignoreTargetLocations) { + return; + } AnnotationMirror[] mirrors = new AnnotationMirror[0]; for (AnnotationMirror am : type.getSuperBound().getAnnotations()) { diff --git a/src/checkers/inference/InferenceVisitor.java b/src/checkers/inference/InferenceVisitor.java index 9d21f62c..e1032054 100644 --- a/src/checkers/inference/InferenceVisitor.java +++ b/src/checkers/inference/InferenceVisitor.java @@ -861,9 +861,9 @@ protected void checkConstructorResult( } /** - * This method creates a mapping from type-use locations a lists of qualifiers. + * This method creates a mapping from type-use locations to a set of qualifiers which cannot be applied to that location. * - * @return A mapping from type-use location to list of qualifiers which cannot be applied to that location. + * @return a mapping from type-use locations to a set of qualifiers which cannot be applied to that location */ protected Map> createMapForIllegalQuals() { Map> locationToIllegalQuals = new HashMap<>();