Re: JDK 8 Minimum Requirement for Maven Resolver 2.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: JDK 8 Minimum Requirement for Maven Resolver 2.0

Elliotte Rusty Harold
On Tue, May 19, 2020 at 6:54 PM Sylwester Lachiewicz
<[hidden email]> wrote:
>
> Hi,
> I would prefer to keep in sync a minimal version of Java version for Maven
> Core and Resolver so we can use all goodies from Java 8 like mentioned
> streams, default methods.
> Real cases - https://jira.apache.org/jira/browse/MNG-6444  migrate code to
> use NIO

NIO is fully functional in Java 7, I think. Certainly you can use Path there.

> Resolver is about to navigate through the graph - so maybe some parts will
> look better, would be easier to understand or can be implemented in a more
> efficient way?

I'd be pleasantly surprised if this proves to be the case. I spend a
**lot** of time in code reviews and refactoring fighting against
incomprehensible lambdas. Maybe one time in ten, I find a lambda more
readable than the alternative. I have **never** encountered a
production use of lambdas that was more efficient than the
alternative.

--
Elliotte Rusty Harold
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: JDK 8 Minimum Requirement for Maven Resolver 2.0

Sylwester Lachiewicz
Yes, we can use Path from NIO now, but if we have methods that return File
it will not work. - please check the last comments in MNG-6444.

Looks like pressure to keep Resoler at Java 7 level is high - I'll not
force that change. I hope after some time it will be more natural.

Thx for votes and arguments.

Sylwester

śr., 20 maj 2020 o 01:08 Elliotte Rusty Harold <[hidden email]>
napisał(a):

> On Tue, May 19, 2020 at 6:54 PM Sylwester Lachiewicz
> <[hidden email]> wrote:
> >
> > Hi,
> > I would prefer to keep in sync a minimal version of Java version for
> Maven
> > Core and Resolver so we can use all goodies from Java 8 like mentioned
> > streams, default methods.
> > Real cases - https://jira.apache.org/jira/browse/MNG-6444  migrate code
> to
> > use NIO
>
> NIO is fully functional in Java 7, I think. Certainly you can use Path
> there.
>
> > Resolver is about to navigate through the graph - so maybe some parts
> will
> > look better, would be easier to understand or can be implemented in a
> more
> > efficient way?
>
> I'd be pleasantly surprised if this proves to be the case. I spend a
> **lot** of time in code reviews and refactoring fighting against
> incomprehensible lambdas. Maybe one time in ten, I find a lambda more
> readable than the alternative. I have **never** encountered a
> production use of lambdas that was more efficient than the
> alternative.
>
> --
> Elliotte Rusty Harold
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>