Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Try in 1.2.2 #1366

Closed
hamnis opened this issue Jun 1, 2016 · 5 comments
Closed

Bug in Try in 1.2.2 #1366

hamnis opened this issue Jun 1, 2016 · 5 comments
Labels

Comments

@hamnis
Copy link
Contributor

hamnis commented Jun 1, 2016

Trying to combine Try and java.util.Optional crashes with java.lang.IllegalAccessError

Optional.of(Try.of() -> "hello")).flatMap(Try::toJavaOptional) blows up.

Optional.of(Try.of(() -> "hello")).flatMap(t -> t.toOption().toJavaOptional()) works.

@danieldietrich
Copy link
Contributor

Hi,
thank you for reporting this!
Is it an option for you to migrate to Javaslang 2.x, there it works.
I remember you suggested some months ago to split Javaslang into smaller modules, right? Is that the reason that you stick to 1.x?
Greets
Daniel

@danieldietrich danieldietrich added this to the 1.2.3 milestone Jun 1, 2016
@hamnis
Copy link
Contributor Author

hamnis commented Jun 1, 2016

No, i have a lib that depends on javaslang 1. I am in the process of upgrading, but everything takes time. I have released a version of my lib that uses the workaround.

@danieldietrich
Copy link
Contributor

I understand. We will fix it but it might need some time...

@danieldietrich
Copy link
Contributor

Related to #1326

danieldietrich added a commit that referenced this issue Aug 18, 2016
@danieldietrich
Copy link
Contributor

danieldietrich commented Aug 18, 2016

Fixed with v1.2.3 - will be available at maven central later today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants