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

ASF GitHub Bot logged work on CURATOR-608:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Aug/21 14:19
            Start Date: 18/Aug/21 14:19
    Worklog Time Spent: 10m 
      Work Description: Randgalt commented on a change in pull request #395:
URL: https://github.com/apache/curator/pull/395#discussion_r691285251



##########
File path: 
curator-x-async/src/test/java/org/apache/curator/x/async/modeled/TestZPath.java
##########
@@ -57,11 +57,11 @@ public void testBasic()
         assertFalse(path.startsWith(ZPath.root.child("two")));
 
         ZPath checkIdLike = ZPath.parse("/one/{two}/three");

Review comment:
       `ZPath.parse()` doesn't consider IDs. The use-case here people who put 
things in their path that look like ZPath IDs. They don't want them considered 
as IDs and want them treated as normal paths. So, yes, it's correct in this 
test that isResolved() returns true. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 639110)
    Time Spent: 1.5h  (was: 1h 20m)

> 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: 1.5h
>  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)

Reply via email to