Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/183#discussion_r19967614
--- Diff:
flink-examples/flink-java-examples/src/main/java/org/apache/flink/examples/java/graph/TransitiveClosureNaive.java
---
@@ -63,8 +63,8 @@ public static void main (String... args) throws Exception{
*/
public Tuple2<Long, Long>
join(Tuple2<Long, Long> left, Tuple2<Long, Long> right) throws Exception {
return new Tuple2<Long, Long>(
- new
Long(left.f0),
- new
Long(right.f1));
+
Long.valueOf(left.f0),
+
Long.valueOf(right.f1));
--- End diff --
It would be better to do this via
`return new Tuple2<Long, Long>(left.f0, right.f1);`
That avoids creating new boxed Longs entirely, just reusing the previous
ones.
---
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.
---