You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/04/27 19:24:04 UTC

[GitHub] [accumulo] keith-turner opened a new issue #2041: Use Map.forEach() in LocalityGroupUtil.java

keith-turner opened a new issue #2041:
URL: https://github.com/apache/accumulo/issues/2041


   Recently Java introduced the `Map.forEach()` method.  Using this in conjunction with a lambda results in more succinct and efficient code compared to looping over `Map.entrySet()`.  One place in the Accumulo source code where `Map.forEach()` could improve the source code is [here](https://github.com/apache/accumulo/blob/9afab2c1b931d100ed6bad5cfe028c28da944427/core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java#L380).
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-828123577


   Some blocks of code can't be converted in this way, because the `forEach` method would allow a lambda that throws a checked exception. So, any candidates for making this change that throw a checked exception will need to remain the way they are now. This is just something for whoever works on this to pay attention to.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-843227326


   @slackwinner , @jjmar11 had expressed to me that they were interested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-843239509


   @slackwinner I think it's fine. Go ahead and re-open your PR. It's a small task, and you've already started on it. It doesn't matter that much.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] slackwinner commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
slackwinner commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-843230932


   @ctubbsii I was about to send a PR to fix this issue but will stand down to allow @jjmar11 to work on this. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii closed issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
ctubbsii closed issue #2041:
URL: https://github.com/apache/accumulo/issues/2041


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] lawynnj commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
lawynnj commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-842665558


   @ctubbsii unfortunately I am not. Sorry!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] lawynnj commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
lawynnj commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-830657442


   Hello, I would like to pick up this issue, if possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] slackwinner commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
slackwinner commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-843035667


   If this task still needs to be done, I can complete it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] ctubbsii commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-842625498


   @lawynnj Are you still interested in working on this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [accumulo] slackwinner commented on issue #2041: Use Map.forEach() in LocalityGroupUtil.java

Posted by GitBox <gi...@apache.org>.
slackwinner commented on issue #2041:
URL: https://github.com/apache/accumulo/issues/2041#issuecomment-843236371


   My mistake. I accidentally hit the draft PR button. I'll close out the PR I made.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org