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:21:53 GMT
On Wed, Jan 10, 2018 at 5:44 PM, Matt Benson <mbenson@apache.org> wrote:

> As I'm sure you're aware, the planned obsolescence of this approach is its
> obvious drawback (a similar drawback exists already in the JavaVersion
> parameter type). I assume this is the reason you said "technical reasons."
> However, wouldn't it be straight up simple, as well as future proof (if
> done correctly), to provide a method that tests an int against the
> available major Java version?
>

Hi Matt,

What would that look like?

Gary


>
> Matt
>
>
> On Jan 10, 2018 6:35 PM, "Gary Gregory" <garydgregory@gmail.com> 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(JavaVersion.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
>

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