You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Ryan Ruel (Jira)" <ji...@apache.org> on 2021/08/04 19:30:00 UTC

[jira] [Commented] (CURATOR-608) ZPath's check for "isParameter()" is too simplistic, leading to isResolved() false negatives

    [ https://issues.apache.org/jira/browse/CURATOR-608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17393414#comment-17393414 ] 

Ryan Ruel commented on CURATOR-608:
-----------------------------------

This has been addressed in the following PR:

https://github.com/apache/curator/pull/395

> ZPath's check for "isParameter()" is too simplistic, leading to isResolved() false negatives
> --------------------------------------------------------------------------------------------
>
>                 Key: CURATOR-608
>                 URL: https://issues.apache.org/jira/browse/CURATOR-608
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 5.1.0
>            Reporter: Ryan Ruel
>            Priority: Major
>             Fix For: 5.2.1
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> ZPath's "isParameter()" method checks to see if an element of the path is a parameter which make be substituted (i.e, "\{param}"). 
> Today, the check merely looks to see if the string contains "/" and then some characters.
> Instead, it should check for the full parameter pattern.
> The check that is in place now can lead to ZPath's which appear fully resolved, but when isResolved() is called on the path are indicated as NOT resolved.  This causes failures with certain ModeledFramework operations.
> For example:
> ZPath rootPath = ZPath.from("/root");
> ZPath path = ZPath.parseWithIds("\{root}/\{one}/two/\{three}").resolved(rootPath, "one", "three");
> This produces a fully resolved path: /root/one/two/three
> But calling "isResolved()" on the created path returns false.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)