Github user chelin commented on the issue:
https://github.com/apache/zookeeper/pull/238
Regarding
> for (char ch : s.toCharArray())
The difference is that toCharArray() results in a copy of the intrinsic
array, leading to increased memory usage
---
If your project is
Github user eribeiro commented on the issue:
https://github.com/apache/zookeeper/pull/238
Totally agree. It is worth another jira, for sure. :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not
Github user alburthoffman commented on the issue:
https://github.com/apache/zookeeper/pull/238
@eribeiro you are correct. foreach loop is more readable.
But for bufEquals, it should be in another commit(code refractor?). cause
this PR is for ZOOKEEPER-2763
let's
Github user eribeiro commented on the issue:
https://github.com/apache/zookeeper/pull/238
Also, loops like the one below:
```
for (int idx = 0; idx < s.length(); idx++) {
char ch = s.charAt(idx);
```
could be simplified to `for (char ch :
Github user eribeiro commented on the issue:
https://github.com/apache/zookeeper/pull/238
@alburthoffman @afine Hey guys, did you notice that the body of `bufEquals`
method could be replaced by `return Arrays.equals(onearray, twoarray);`?
In fact, the current implementation