commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [lang]
Date Thu, 11 Jan 2018 03:23:04 GMT
On Wed, Jan 10, 2018 at 5:47 PM, Gilles <gilles@harfang.homelinux.org>
wrote:

> On Wed, 10 Jan 2018 17:34:55 -0700, Gary Gregory wrote:
>
>> Hi All:
>>
>> I find myself writing a lot of this kind of code:
>>
>> if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8)) ...
>>
>> and
>>
>>
>> Assume.assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersi
>> on.JAVA_1_8));
>>
>> I think this would be more tidy:
>>
>> if (SystemUtils.isJavaVersionAtLeast8()) ...
>>
>> If this makes your skin crawl, please present a (technical) argument
>> against it...
>>
>> Gary
>>
>
> Can't you do something like
>
> if (JavaVersion.isAtLeast(JavaVersion.JAVA_1_8)) ...
>

That would not compile, there is no static JavaVersion.isAtLeast() method.

Gary

>
> ?
>
> Gilles
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message