-
Notifications
You must be signed in to change notification settings - Fork 157
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
chore: Add identity function. #1671
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pointless? The Java identity function already exists in JDK 1.8 as java.util.function.Function.identity
.
This might be useful for versions of JDK before 1.8 but Pekko doesn't support those JDK's
@mdedetrich Yes and no, see below: |
Can you translate the IDE issue into English? I prefer not to have images - if you paste the text (even the Chinese text), I can get a tool to translate it. If you paste images, I need an OCR tool and I don't have one available. |
Sorry, the |
I'm ok with adding this if it helps. I would like to still have some of tests use |
} catch (Exception e) { | ||
Assert.fail("Exception thrown: " + e.getMessage()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a dedicated test @pjfanning
@mdedetrich would you like talking another look, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunate to have all those function types, but given those this seems like a nice utility
@mdedetrich Would you like to unblock this, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Motivation:
Make life easier for Java developers without the
i -> i
Modification:
Add an
identity
helper function.Result:
Clean code.