flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apivovarov <...@git.apache.org>
Subject [GitHub] flink pull request #2490: [FLINK-4609] Remove redundant check for null in Cr...
Date Sun, 11 Sep 2016 03:42:10 GMT
Github user apivovarov commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2490#discussion_r78287335
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/operators/CrossOperator.java
---
    @@ -129,14 +129,11 @@ private String getDefaultName() {
     
     		public DefaultCross(DataSet<I1> input1, DataSet<I2> input2, CrossHint hint,
String defaultName) {
     			
    -			super(input1, input2, new DefaultCrossFunction<I1, I2>(),
    +			super(Preconditions.checkNotNull(input1, "input1 is null"),
    --- End diff --
    
    DefaultCross calls `input1.getType()` and `input2.getType()` before calling super() on
line 134. So, if we add null check to super class (e.g. TwoInputOperator) it will not work
for DefaultCross


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message