Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/565#discussion_r12027679
--- Diff: examples/src/main/java/org/apache/spark/examples/JavaTC.java ---
@@ -85,7 +85,7 @@ public static void main(String[] args) {
}
});
- long oldCount = 0;
+ long oldCount;
--- End diff --
Yeah it's super minor but my IDE also flags things like this. The initial
value is overwritten straight away in the loop, so initializing it is flagged
as a trivial mistake. Unlike with instance variables, Java would not allow
omitting the initialization of a local if it were possible to read its value
before it was ever written. It's not a question of letting it rely on a default
value here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---