kevinrr888 commented on PR #4791:
URL: https://github.com/apache/accumulo/pull/4791#issuecomment-2292067193
@meatballspaghetti - Here is an example of what I'm talking about from
`TokenFileIT`:
```
int i =
scanner.stream().map(Map.Entry::getValue).map(Value::get).map(String::new)
.map(Integer::parseInt).collect(onlyElement());
```
Here, `String::new` is used as a method reference to the `String`
constructor that takes `byte[]` as its arg since `Value::get` returns `byte[]`.
I'm suggesting the above (and elsewhere this applies) be changed to
```
int i = scanner.stream().map(Map.Entry::getValue).map(Value::get).map(e ->
new String(e, UTF_8))
.map(Integer::parseInt).collect(onlyElement());
```
--
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]