[LANG] Checked Functions PR

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

[LANG] Checked Functions PR

Aleksander Ściborek
I've just created  pull request
<https://github.com/apache/commons-lang/pull/401> to a set of functions
which are wrappers for standard interfaces from java.util.function.
The idea behind this is that you can create an instance of a function which
throws a checked exception and then using a static method create an
instance of standard function which invocation of a checked functions.
Those interfaces were designed in order to using stream API easier
Reply | Threaded
Open this post in threaded view
|

Re: [LANG] Checked Functions PR

Matt Sicker
I like this idea in theory. What would really make this shine is
including similar default methods as the unchecked classes.

On Mon, 28 Jan 2019 at 18:04, Aleksander Ściborek
<[hidden email]> wrote:
>
> I've just created  pull request
> <https://github.com/apache/commons-lang/pull/401> to a set of functions
> which are wrappers for standard interfaces from java.util.function.
> The idea behind this is that you can create an instance of a function which
> throws a checked exception and then using a static method create an
> instance of standard function which invocation of a checked functions.
> Those interfaces were designed in order to using stream API easier



--
Matt Sicker <[hidden email]>

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

Reply | Threaded
Open this post in threaded view
|

Re: [LANG] Checked Functions PR

Aleksander Ściborek
I'm going to add those functionalities (default methods).


On Tue, 29 Jan 2019 at 16:56, Matt Sicker <[hidden email]> wrote:

> I like this idea in theory. What would really make this shine is
> including similar default methods as the unchecked classes.
> Matt Sicker <[hidden email]>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [LANG] Checked Functions PR

jochen-2
In reply to this post by Aleksander Ściborek
On Tue, Jan 29, 2019 at 1:04 AM Aleksander Ściborek
<[hidden email]> wrote:

> The idea behind this is that you can create an instance of a function which
> throws a checked exception and then using a static method create an
> instance of standard function which invocation of a checked functions.

Have you seen [1]?

1: https://gitbox.apache.org/repos/asf?p=commons-lang.git;a=blob_plain;f=src/main/java/org/apache/commons/lang3/Functions.java;h=5eaed0c6fa8dbb8ed7a2ba37d499130ba62f138b;hb=HEAD

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

Reply | Threaded
Open this post in threaded view
|

Re: [LANG] Checked Functions PR

Pascal Schumacher
Am 30.01.2019 um 20:27 schrieb Jochen Wiedmann:
> Have you seen [1]?
>
> 1: https://gitbox.apache.org/repos/asf?p=commons-lang.git;a=blob_plain;f=src/main/java/org/apache/commons/lang3/Functions.java;h=5eaed0c6fa8dbb8ed7a2ba37d499130ba62f138b;hb=HEAD

By the way:

https://github.com/apache/commons-lang/commit/11d9eb47a40359e74a5e24daf681beacd71b35f0

https://github.com/apache/commons-lang/commit/2ebc17ba3f244ae44aae46273aeef7e321f9542a

break the (travis-ci) build, because:

- FunctionsTest is missing the apache license header

- Functions and FunctionsTest contain check-style violations

Please run `mvn` and fix the issues reported.

Thanks,

Pascal





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

Reply | Threaded
Open this post in threaded view
|

Re: [LANG] Checked Functions PR

Aleksander Ściborek
Yes i saw
https://gitbox.apache.org/repos/asf?p=commons-lang.git;a=blob_plain;f=src/main/java/org/apache/commons/lang3/Functions.java;h=5eaed0c6fa8dbb8ed7a2ba37d499130ba62f138b;hb=HEAD,
unfortunately it was created after  I had developed my interfaces. I saw
there are some difference, like no methods to transform  to a failable
function to a plain java function, and I'm going to add some high order
functions. Hover if community decide that my work is redundant i'll close
this pull request.

On Wed, 30 Jan 2019 at 20:58, Pascal Schumacher <[hidden email]>
wrote:

> Am 30.01.2019 um 20:27 schrieb Jochen Wiedmann:
> > Have you seen [1]?
> >
> > 1:
> https://gitbox.apache.org/repos/asf?p=commons-lang.git;a=blob_plain;f=src/main/java/org/apache/commons/lang3/Functions.java;h=5eaed0c6fa8dbb8ed7a2ba37d499130ba62f138b;hb=HEAD
>
> By the way:
>
>
> https://github.com/apache/commons-lang/commit/11d9eb47a40359e74a5e24daf681beacd71b35f0
>
>
> https://github.com/apache/commons-lang/commit/2ebc17ba3f244ae44aae46273aeef7e321f9542a
>
> break the (travis-ci) build, because:
>
> - FunctionsTest is missing the apache license header
>
> - Functions and FunctionsTest contain check-style violations
>
> Please run `mvn` and fix the issues reported.
>
> Thanks,
>
> Pascal
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>