From 58cea05940a081565065e88cd7bb956e6e869035 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Mon, 1 May 2023 08:02:46 -0700 Subject: [PATCH] Documentation improvements (#5822) --- .../checkerframework/checker/lock/qual/GuardSatisfied.java | 6 ++++-- .../initialization/InitializationAnnotatedTypeFactory.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/checker-qual/src/main/java/org/checkerframework/checker/lock/qual/GuardSatisfied.java b/checker-qual/src/main/java/org/checkerframework/checker/lock/qual/GuardSatisfied.java index 711ae1660fa..460ec9e7c1b 100644 --- a/checker-qual/src/main/java/org/checkerframework/checker/lock/qual/GuardSatisfied.java +++ b/checker-qual/src/main/java/org/checkerframework/checker/lock/qual/GuardSatisfied.java @@ -36,8 +36,10 @@ @SubtypeOf(GuardedByUnknown.class) // TODO: Should @GuardSatisfied be in its own hierarchy? public @interface GuardSatisfied { /** - * The index on the GuardSatisfied polymorphic qualifier. Defaults to -1 so that the user can - * write any index starting from 0. + * The index on the GuardSatisfied polymorphic qualifier, if any. Defaults to -1 so that, if the + * user writes 0, that is different than writing no index. Writing no index is the usual case. + * + * @return the index on the GuardSatisfied polymorphic qualifier, or -1 if none */ int value() default -1; } diff --git a/checker/src/main/java/org/checkerframework/checker/initialization/InitializationAnnotatedTypeFactory.java b/checker/src/main/java/org/checkerframework/checker/initialization/InitializationAnnotatedTypeFactory.java index f35a69187ab..e2f23c059e4 100644 --- a/checker/src/main/java/org/checkerframework/checker/initialization/InitializationAnnotatedTypeFactory.java +++ b/checker/src/main/java/org/checkerframework/checker/initialization/InitializationAnnotatedTypeFactory.java @@ -924,7 +924,7 @@ protected AnnotationMirror leastUpperBoundInitialization( } /** - * Returns the least upper bound of two types. + * Returns the least upper bound of two Java basetypes (without annotations). * * @param a the first argument * @param b the second argument