[ 
https://issues.apache.org/jira/browse/FLINK-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15264353#comment-15264353
 ] 

ASF GitHub Bot commented on FLINK-3821:
---------------------------------------

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

    https://github.com/apache/flink/pull/1938#discussion_r61613247
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/io/CsvInputFormat.java ---
    @@ -133,13 +132,17 @@ public OUT readRecord(OUT reuse, byte[] bytes, int 
offset, int numBytes) throws
        protected static boolean[] toBooleanMask(int[] sourceFieldIndices) {
                Preconditions.checkNotNull(sourceFieldIndices);
     
    +           int max = 0;
                for (int i : sourceFieldIndices) {
                        if (i < 0) {
                                throw new IllegalArgumentException("Field 
indices must not be smaller than zero.");
                        }
    +                   if (i > max) {
    --- End diff --
    
    Use the intrinsic `max = Math.max(max, i);`?


> Reduce Guava usage in flink-java
> --------------------------------
>
>                 Key: FLINK-3821
>                 URL: https://issues.apache.org/jira/browse/FLINK-3821
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API
>    Affects Versions: 1.0.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Trivial
>             Fix For: 1.1.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to