GitHub user kennknowles opened a pull request:
https://github.com/apache/beam/pull/4021
[BEAM-3081] Findbugs: NonNull by default
Follow this checklist to help us incorporate your contribution quickly and
easily:
- [ ] Make sure there is a [JIRA
issue](https://issues.apache.org/jira/projects/BEAM/issues/) filed for the
change (usually before you start working on it). Trivial changes like typos do
not require a JIRA issue. Your pull request should address just this issue,
without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject
line and body.
- [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue.
- [ ] Write a pull request description that is detailed enough to
understand what the pull request does, how, and why.
- [ ] Run `mvn clean verify` to make sure basic checks pass. A more
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
---
R: @jkff since you mentioned the time findbugs spent, I thought I would try
to get more value out of it anyhow.
I have wondered for a while why `@Nullable` annotations didn't take care of
themselves, since this is maybe the most important thing findbugs ought to be
gaining us. Turns out it is simply turned off by default. It has to be turned
on per-package, as far as I can tell. That is just as well, because some
packages are in better shape than others.
I addressed some low-hanging fruit to demonstrate, and the changes I made
were universally improvements IMO, so that's nice evidence in favor of taking
this further.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kennknowles/beam NonNull-by-default
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/4021.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4021
----
commit b6a23a93efebe7973ad602faa7796ff50bb71769
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-19T22:07:12Z
Add dep on Apache-licensed findbugs-annotations implementation
Very useful library, previously unavailable under an acceptable license.
This
is a compatible library reimplemented, discussed and now used by many Apache
projects, including Avro, Falcon, Geode, HBase, Nifi, and Rya.
commit 5f83a2dbfcc6c8f9fc892037cff426a552696905
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T02:27:21Z
Make Java core SDK root dir NonNull by default
commit 4ccf818735d0b67b9283cccc90e7fbd7218820de
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T02:42:44Z
NonNull by default in sdk/coders
commit b702fb102ec94c8737b55ccdce8c99087dd54fcb
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T02:43:02Z
NonNull by default in sdk/annotations
commit bcb2f4563b1331600e64f2a1458e4d126e94d6a9
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T02:50:47Z
NonNull by default in sdk/runners
commit 136fc4ce3648bd6eebaf8233c6269d49a0b75a11
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T02:54:46Z
NonNull by default in sdk/state
commit f16feba0febb9e42fc78db63ae64c26f949c2b3a
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T03:08:36Z
NonNull by default for sdk/testing
commit b92643d2b8b6c482deae408774868d72fc7848bb
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T03:26:41Z
Ignore findbugs in AutoValue generated classes
commit 9d34d49de28e412aa7147442765f1012bf5d4634
Author: Kenneth Knowles <[email protected]>
Date: 2017-10-20T03:26:59Z
NonNull by default in metrics
----
---