[BEAM-5161] FindBugs enabled#21
Conversation
…such as `ClassAwareKryoCoder` removed.
| */ | ||
| public class BeamFlow extends Flow { | ||
|
|
||
| @SuppressFBWarnings("SE_TRANSIENT_FIELD_NOT_RESTORED") |
There was a problem hiding this comment.
this is there because when the flow starts, it isnt needed anymore, am I right?
There was a problem hiding this comment.
Yes, but it is a little more complicated. It have to be transient since PCollection is not serializable on purpose. FindBugs suggest to fix this by initializing it within readObject() serialization method. That will also not work since we need it final too.
| * @param <T> the type of elements stored in this list storage | ||
| */ | ||
| @Audience(Audience.Type.EXECUTOR) | ||
| @SuppressFBWarnings("OBL_UNSATISFIED_OBLIGATION") |
There was a problem hiding this comment.
is it because, its used only for testing?
There was a problem hiding this comment.
Nope. FindBugs compleins that streams are not closed propertly. Which is true. But fixing it would mean to redesign whole class or even the API. I would rather avoid thad in pert which will not be used in Beam in future.
|
|
||
| private final int sinkId = System.identityHashCode(this); | ||
|
|
||
| @SuppressFBWarnings("SE_BAD_FIELD") |
There was a problem hiding this comment.
is it because, its used only for testing?
There was a problem hiding this comment.
This is in fact very similar to the BeamFlow case.
FindBugs enabled. All warnings sorted out.
Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.It will help us expedite review of your Pull Request if you tag someone (e.g.
@username) to look at it.Post-Commit Tests Status (on master branch)