RFR: 8339852: Fix typos in java.compiler documentation

Chen Liang liach at openjdk.org
Tue Sep 10 16:47:06 UTC 2024


On Tue, 10 Sep 2024 16:29:43 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> Please review this PR to fix typos and formatting issues. Some typos are trivial, others relate to domain vocabulary.

src/java.compiler/share/classes/javax/annotation/processing/Processor.java line 198:

> 196:  *
> 197:  * @apiNote Implementors of this interface may find it convenient
> 198:  * to extend {@link AbstractProcessor} rather than implement this

The original grammar was correct: "rather than something" so "implementing" is correct as a noun. Or you can say "to implement".

src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java line 55:

> 53:  * <p>In the definitions below, an annotation <i>A</i> has an
> 54:  * annotation interface <i>AI</i>. If <i>AI</i> is a repeatable annotation
> 55:  * interface, the type of the container annotation is <i>AIC</i>.

"the annotation interface of the container annotation is *AIC*"
or
"the containing annotation interface is *AIC*"

To align with the JLS.

src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java line 192:

> 190: 
> 191:     /**
> 192:      * Returns annotations of the specified type that are <em>associated</em>

Suggestion:

     * Returns annotations of the specified interface that are <em>associated</em>

src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java line 195:

> 193:      * with this construct.
> 194:      *
> 195:      * If there are no annotations of the specified type associated with this

Suggestion:

     * If there is no annotation of the specified interface associated with this

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20937#discussion_r1752303973
PR Review Comment: https://git.openjdk.org/jdk/pull/20937#discussion_r1752305614
PR Review Comment: https://git.openjdk.org/jdk/pull/20937#discussion_r1752306566
PR Review Comment: https://git.openjdk.org/jdk/pull/20937#discussion_r1752306829


More information about the compiler-dev mailing list