`ExtendsObject` error message is confusing/misleading
See original GitHub issueThe ExtendsObject
error message is:
“
T extends Object
is redundant in normal Java, and does not work to describeT
as non-null across compilation boundaries when the Checker Framework unless you compile users against bytecode generated by the Checker Framework javac. (If you are building this code with the Checker Framework javac, then disable this check.)”
This error message can be improved.
- “normal Java” suggests that the Checker Framework is an incompatible variant. The Checker Framework uses standard Java.
- “compile users” is probably a typo.
- The message mentions nullness, but
extends Object
is meaningful for any type system for which the top type is not the default. Several such type systems exist. - Use of the “Checker Framework javac” is a red herring. This is relevant to every project that ever uses the Checker Framework, regardless of which version of
javac
they are running and whether the Checker Framework is run on a particular execution.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to error message on change of group name if it...
Hi All, I have used below script to validate group name if it is already existed or not. But its not working for...
Read more >Google error-prone Issues - Giters
Google error-prone: Catch common Java mistakes as compile-time errors. ... `ExtendsObject` error message is confusing/misleading. Closed 4 months ago 5 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, that is correct.
A reference is the first paragraph of Command line, via Checker Framework javac wrapper, which says:
BTW, there is a stray close paren and seemingly an unnecessary line break at https://errorprone.info/bugpattern/ExtendsObject .