RFR: 8285485: Fix typos in corelibs

Magnus Ihse Bursie ihse at openjdk.java.net
Fri May 13 11:35:19 UTC 2022


On Wed, 27 Apr 2022 17:11:34 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> I ran `codespell` on modules owned by core-libs, and accepted those changes where it indeed discovered real typos.
>> 
>> I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder).
>> 
>> The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR.
>
> src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLDOMWriterImpl.java line 238:
> 
>> 236: 
>> 237:     /**
>> 238:      * Creates a DOM Attribute @see org.w3c.dom.Node and associates it with the current DOM element @see org.w3c.dom.Node.
> 
> Not that it matters in this PR, but I think I should mention that `@see` tags do not work like that. (No action needed from you.)

Yeah. There's a lot of crappy code hanging around. :( Feel free to open a bug on checking incorrect usage of `@see` tags in the JDK. I'm sure you'll find more cases than those.

> src/java.xml/share/classes/javax/xml/transform/Transformer.java line 127:
> 
>> 125:      * namespace URI in curly braces ({}).
>> 126:      * @param value The value object.  This can be any valid Java object. It is
>> 127:      * up to the processor to provide the proper object coersion or to simply
> 
> That made me pause: some systems have the notion of _type coercion_; but your change looks right.

I also had to read this a couple of time, and check the source.

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

PR: https://git.openjdk.java.net/jdk/pull/8364


More information about the nio-dev mailing list