Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3157#discussion_r22241846
  
    --- Diff: 
streaming/src/test/java/org/apache/spark/streaming/JavaAPISuite.java ---
    @@ -1012,7 +1012,7 @@ public void testPairToPairFlatMapWithChangingTypes() 
{ // Maps pair -> pair
               }
             });
         JavaTestUtils.attachTestOutputStream(flatMapped);
    -    List<List<Tuple2<String, Integer>>> result = 
JavaTestUtils.runStreams(ssc, 2, 2);
    +    List<List<Tuple2<Integer, String>>> result = 
JavaTestUtils.runStreams(ssc, 2, 2);
    --- End diff --
    
    The generic types are wrong, but the underlying objects are fine. 
`JavaTestUtils.runStreams` returns a `List<List<V>>` so happily binds the 
`Tuple2` type to whatever the caller says. The reason the comparison compiled 
was that `assertEquals(Object, Object)` accepts anything. The ultimate 
`List.equals()` method doesn't care about types and compares values which are 
in fact correct and of the right type and equal.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to