[GitHub] zookeeper issue #140: ZOOKEEPER-2656: Fix ServerConfigTest#testValidArgument...
Github user hanm commented on the issue: https://github.com/apache/zookeeper/pull/140 Thanks @rakeshadr for review. Could you please merge this in (for master, 3.5, 3.4)? --- 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 have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] zookeeper issue #140: ZOOKEEPER-2656: Fix ServerConfigTest#testValidArgument...
Github user rakeshadr commented on the issue: https://github.com/apache/zookeeper/pull/140 Thanks @hanm, @eribeiro. +1 LGTM --- 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 have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] zookeeper issue #140: ZOOKEEPER-2656: Fix ServerConfigTest#testValidArgument...
Github user eribeiro commented on the issue: https://github.com/apache/zookeeper/pull/140 @hanm Nope, I don't see any practical failure cases in the context of ZK. Just wanted to make sure we brought up just in case, but **I agree with you, I feel it's okay to use File.equals()**. ð --- 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 have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] zookeeper issue #140: ZOOKEEPER-2656: Fix ServerConfigTest#testValidArgument...
Github user hanm commented on the issue: https://github.com/apache/zookeeper/pull/140 @eribeiro Yeah, I read about the difference but I think in our context it is pretty safe to use File.equals given the actual string literal returned from getDataDir and the string it compares against would be exact the same (so the corner cases does not apply here). Initially I used getCanonicalPath for safety but since you brought this up and I thought about it, I feel it's OK. Do you see any practical failure cases that we would run into here by using File.equals? --- 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 have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] zookeeper issue #140: ZOOKEEPER-2656: Fix ServerConfigTest#testValidArgument...
Github user eribeiro commented on the issue: https://github.com/apache/zookeeper/pull/140 @hanm Oh, excuse me! There's a gotcha with ``File.equals()``. Shame on me for inducing your change to ``equals``. ð See here: http://stackoverflow.com/questions/8930859/java-file-equals And here: http://stackoverflow.com/questions/29368308/java-nio-how-is-path-issamefile-different-from-path-equals TL;DR: ``f1.getCanonicalPath().equals(f2.getCanonicalPath())`` is the right way to go. Or with **java 7** we can do ``Files.isSameFile(f1.toPath(), f2.toPath());`` --- 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 have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] zookeeper issue #140: ZOOKEEPER-2656: Fix ServerConfigTest#testValidArgument...
Github user eribeiro commented on the issue: https://github.com/apache/zookeeper/pull/140 Congratulations, @hanm. IMHO, it's a very elegant and simple solution to 3.4, 3.5, master compatibility. ð Let's wait for @rakeshadr feedback, but I am +1 for my corner, haha. Cheers! --- 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 have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] zookeeper issue #140: ZOOKEEPER-2656: Fix ServerConfigTest#testValidArgument...
Github user hanm commented on the issue: https://github.com/apache/zookeeper/pull/140 Updated PR title to reference correct ZOOKEEPER JIRA issue. --- 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 have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---