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

Gian Merlino commented on CALCITE-5477:
---------------------------------------

Sorry for the delay in responding. I was out of office for a bit, but I am back 
at work now.

One other possible solution is to copy the latest version of Preconditions from 
Guava into Calcite itself, and use that instead of the one from Guava. Then, 
we'd get the benefit of the non-boxing overloads, as well as the benefit of 
compatibility with a wider range of Guava versions. What do you think of that 
option?

> Prefer Util.checkArgument over Preconditions.checkArgument
> ----------------------------------------------------------
>
>                 Key: CALCITE-5477
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5477
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Gian Merlino
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Related to CALCITE-5428.
> Preconditions.checkArgument gained new overloads in Guava 20.0, which 
> prevents code built using Guava 20.0 from running properly with earlier 
> versions of Guava. (When building against a later version of Guava, as 
> Calcite does by default, the Java compiler generates calls to methods that 
> don't exist in those earlier versions.)
> Example: in Guava 20.0 there is {{checkArgument(boolean, String, int)}}; in 
> earlier versions this would be handled by {{checkArgument(boolean, String, 
> Object...)}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to