[
https://issues.apache.org/jira/browse/CURATOR-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16704681#comment-16704681
]
ASF GitHub Bot commented on CURATOR-458:
----------------------------------------
Github user leventov commented on a diff in the pull request:
https://github.com/apache/curator/pull/257#discussion_r237848592
--- Diff:
curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java
---
@@ -105,7 +105,8 @@ public static SchemaBuilder builderForRecipe(String
parentPath)
Schema(String name, Pattern pathRegex, String path, String
documentation, SchemaValidator schemaValidator, Allowance ephemeral, Allowance
sequential, Allowance watched, boolean canBeDeleted, Map<String, String>
metadata)
{
- Preconditions.checkNotNull((pathRegex != null) || (path != null),
"pathRegex and path cannot both be null");
+ Preconditions.checkNotNull(pathRegex, "pathRegex cannot both be
null");
+ Preconditions.checkNotNull(path, "path cannot both be null");
this.pathRegex = pathRegex;
--- End diff --
Actually my original fix was wrong logically. What should have been done is
just changing `Preconditions.checkNotNull()` call with
`Preconditions.checkArgument()`. Fixed now.
> Use error-prone compiler
> ------------------------
>
> Key: CURATOR-458
> URL: https://issues.apache.org/jira/browse/CURATOR-458
> Project: Apache Curator
> Issue Type: Improvement
> Reporter: Roman Leventov
> Assignee: Jordan Zimmerman
> Priority: Major
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)