Skip to content

Implement recoverAndTry and recoverAllAndTry #2948

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

Merged
merged 1 commit into from
Mar 2, 2025

Conversation

atakanserin
Copy link
Contributor

@atakanserin atakanserin commented Dec 21, 2024

No description provided.

@pivovarit
Copy link
Member

Thanks for your submission! This is looking good! Give me a second to process it - I'm now in the process of scoping changes that could go into the next major version, and we don't often get a shot to make some backward-incompatible API changes

@atakanserin
Copy link
Contributor Author

atakanserin commented Dec 29, 2024

Thanks for the review @pivovarit! Ah I see, alright. Maybe it is a better idea to make a pull request to version/0.x branch first?

@atakanserin
Copy link
Contributor Author

Hi @pivovarit Sorry just had time... Here is pull request into the version/1.x instead

@pivovarit
Copy link
Member

pivovarit commented Mar 1, 2025

Hi! @atakanserin - I'm willing to merge this, but I'm afraid with all that merging and rebasing you ended up in a limbo between 1.x and 0.x :)

Please check out main branch and run git cherry-pick ecf4859dc (your original commit) and push force this into this branch and switch it to target main

@atakanserin atakanserin changed the base branch from version/1.x to main March 1, 2025 15:47
@atakanserin
Copy link
Contributor Author

atakanserin commented Mar 1, 2025

Hey @pivovarit ! I think I got you right, this is what I did:

hard reset vavr:main onto recover-and-try
cherry pick ecf4859
force push
change the pull request target to main

Seems like it picked up today's dependabot commit. So seems up to date at least...

Kindly review

* @return a {@code Try} that is either this {@code Success} or a new {@code Try} evaluated from {@code recoveryAttempt}
* @throws NullPointerException if {@code recoveryAttempt} is null
*/
public final Try<T> recoverAllAndTry(CheckedFunction0<? extends T> recoveryAttempt) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't you mean default instead of final?

@pivovarit
Copy link
Member

@atakanserin
Copy link
Contributor Author

Good morning @pivovarit Oh I see, it is an interface now. I should have checked before pushing...

Changed it to a default method and ran all unit tests as well as javadoc check. They are passing locally.

Hopefully should be fine now.

@pivovarit
Copy link
Member

No worries, it's looking good now. I will double-check when I get home and planning to merge it if everything is ok - I see that workflows are running as well

@atakanserin
Copy link
Contributor Author

Many thanks!

@pivovarit pivovarit self-requested a review March 2, 2025 12:09
@pivovarit pivovarit merged commit 8b0f051 into vavr-io:main Mar 2, 2025
8 checks passed
@pivovarit
Copy link
Member

Thanks for your patience :)

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

Successfully merging this pull request may close these issues.

2 participants