[GitHub] zookeeper issue #238: ZOOKEEPER-2763: Utils.toCsvBuffer() omits leading 0 fo...

2017-05-23 Thread chelin
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] zookeeper issue #238: ZOOKEEPER-2763: Utils.toCsvBuffer() omits leading 0 fo...

2017-05-22 Thread eribeiro
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] zookeeper issue #238: ZOOKEEPER-2763: Utils.toCsvBuffer() omits leading 0 fo...

2017-05-22 Thread alburthoffman
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] zookeeper issue #238: ZOOKEEPER-2763: Utils.toCsvBuffer() omits leading 0 fo...

2017-05-19 Thread eribeiro
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] zookeeper issue #238: ZOOKEEPER-2763: Utils.toCsvBuffer() omits leading 0 fo...

2017-05-19 Thread eribeiro
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