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

(refactor) some opportunities to use lambda functions #786

Open
wants to merge 1 commit into
base: moved-to-apache
Choose a base branch
from

Conversation

desmorto
Copy link

No description provided.

@revans2
Copy link
Contributor

revans2 commented Aug 25, 2017

@desmorto you might want to make your pull request against the Apache version of storm that is under active development.

@qm3ster
Copy link

qm3ster commented Mar 5, 2018

In such clear cases, what's the advantage of forEach?
Is this a Java thing?

@@ -59,9 +59,9 @@ public IConnection connect(String storm_id, String host, int port) {
* terminate this context
*/
public void term() {
for (IConnection conn : connections) {
connections.forEach(conn -> {
Copy link

Choose a reason for hiding this comment

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

@desmorto, You can remove unnecessary brackets or use a method reference.

connections.forEach(conn -> conn.close());

for (List<Object> key : keys) {
ret.add(db.get(key));
}
keys.forEach(key -> {
Copy link

Choose a reason for hiding this comment

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

Please format the all code.

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.

4 participants