[
https://issues.apache.org/jira/browse/CURATOR-458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447407#comment-16447407
]
ASF GitHub Bot commented on CURATOR-458:
----------------------------------------
Github user cammckenzie commented on a diff in the pull request:
https://github.com/apache/curator/pull/257#discussion_r183254951
--- 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 --
The existing check here seems like it was incorrect, as it would have
returned a boolean which would never be null. This change will fix it, but
there error messages are now incorrect. They should just be "pathRegex cannot
be null" and "path cannot be null" respectively.
> 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)