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

ASF GitHub Bot commented on PARQUET-1503:
-----------------------------------------

gszadovszky commented on pull request #598: PARQUET-1503: Remove Ints Utility 
Class
URL: https://github.com/apache/parquet-mr/pull/598
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Remove Ints Utility Class
> -------------------------
>
>                 Key: PARQUET-1503
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1503
>             Project: Parquet
>          Issue Type: Improvement
>    Affects Versions: 1.9.0
>            Reporter: BELUGA BEHR
>            Priority: Minor
>              Labels: pull-request-available
>
> {code:java}
>   public static int checkedCast(long value) {
>     int valueI = (int) value;
>     if (valueI != value) {
>       throw new IllegalArgumentException(String.format("Overflow casting %d 
> to an int", value));
>     }
>     return valueI;
>   }
> {code}
> [Link 
> Here|https://github.com/apache/parquet-mr/blob/dc61e510126aaa1a95a46fe39bf1529f394147e9/parquet-common/src/main/java/org/apache/parquet/Ints.java#L35]
> Now that the Parquet-MR project uses Java 1.8, this method can now be 
> replaced with Java {{Math}} class and {{toIntExact}} method.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to