Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 669A210933 for ; Wed, 19 Nov 2014 11:24:47 +0000 (UTC) Received: (qmail 65614 invoked by uid 500); 19 Nov 2014 11:24:47 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 65574 invoked by uid 500); 19 Nov 2014 11:24:47 -0000 Mailing-List: contact issues-help@flink.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.incubator.apache.org Delivered-To: mailing list issues@flink.incubator.apache.org Received: (qmail 65565 invoked by uid 99); 19 Nov 2014 11:24:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2014 11:24:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 19 Nov 2014 11:24:45 +0000 Received: (qmail 65087 invoked by uid 99); 19 Nov 2014 11:24:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2014 11:24:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 273969AACC2; Wed, 19 Nov 2014 11:24:25 +0000 (UTC) From: uce To: issues@flink.incubator.apache.org Reply-To: issues@flink.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-flink pull request: [FLINK-1040] Make type() call in pro... Content-Type: text/plain Message-Id: <20141119112425.273969AACC2@tyr.zones.apache.org> Date: Wed, 19 Nov 2014 11:24:25 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user uce commented on a diff in the pull request: https://github.com/apache/incubator-flink/pull/194#discussion_r20569395 --- Diff: flink-java/src/main/java/org/apache/flink/api/java/operators/CrossOperator.java --- @@ -356,7 +381,7 @@ public CrossProjection(DataSet ds1, DataSet ds2, int[] firstFieldIndexes // check field indexes and adapt to position in tuple int maxFieldIndex = firstInput ? numFieldsDs1 : numFieldsDs2; for(int i=0; i maxFieldIndex - 1) { + if(this.fieldIndexes[i] > maxFieldIndex - 1 || this.fieldIndexes[i] < 0) { --- End diff -- minor: I think we should replace these checks with [Preconditions.checkElementIndex](http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/com/google/common/base/Preconditions.html#checkElementIndex%28int,%20int%29), which is more concise and throws the respective Exception for you (it might be a matter of taste though :P). --- 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. ---