RFR: 8254274: Development to add 'lint' warning for @ValueBased classes
Srikanth Adayapalam
sadayapalam at openjdk.java.net
Wed Oct 28 09:00:28 UTC 2020
On Mon, 26 Oct 2020 17:11:55 GMT, Dan Smith <dlsmith at openjdk.org> wrote:
>> A few questions for reviewers:
>>
>> (1) Do we want the lint mode to be on my default ? Presently it is off and has to be expressly opted into.
>> (2) Do we want to not use up a bit for VALUE_BASED flag and simply walk the annotations to determine if a type is value based ??
>
>> (1) Do we want the lint mode to be on my default ? Presently it is off and has to be expressly opted into.
>
> Given that it's already been established that there's an ad hoc set of on-by-default lint warnings, yeah, I think this one makes sense to put in that set. (Inventing a new concept of on-by-default lint warnings is something I'd be more hesitant about.)
I have pushed additional changes to incorporate review comments:
- The lint mode's token is "synchronization" (instead of "synchronize")
- This lint mode is on by default
- Redundant warnings on wait/notify calls are removed.
- We don't burn up a flag bit to mark value based classes. We simply walk the declaration annotations on a class to discover the ones that are @ValueBased
- Ensure descriptions (in the neighbourhood) in javac.properties end with a period for consistency's sake.
- Streamline and simplify tests.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/237
More information about the valhalla-dev
mailing list