goiri commented on code in PR #4375:
URL: https://github.com/apache/hadoop/pull/4375#discussion_r885918464
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/resolver/order/TestLocalResolver.java:
##########
@@ -78,12 +77,8 @@ public void testLocalResolver() throws IOException {
StringBuilder sb = new StringBuilder("clientX");
LocalResolver localResolver = new LocalResolver(conf, router);
LocalResolver spyLocalResolver = spy(localResolver);
- doAnswer(new Answer<String>() {
- @Override
- public String answer(InvocationOnMock invocation) throws Throwable {
- return sb.toString();
- }
- }).when(spyLocalResolver).getClientAddr();
+ doAnswer((Answer<String>) invocation ->
Review Comment:
The line split is a little weird. Maybe better as:
```
doAnswer((Answer<String>) invocation -> sb.toString()
).when(spyLocalResolver).getClientAddr();
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]