There is a class PathStringUtils that could be replaced by implementing these functions in Path
PathService uses PathStringUtils and could use Path instead
PathService.findItemForPath uses a substring match for finding whether a path belongs to a particular version, which may match areas that are not about the version of a path
e.g.
fo:Test folder|dm:main datamodel $1.0.0|dc:label for dataclass
fo:main folder|dm:datamodel label $1.0.0|dc:label for dataclass
would both match the version string 'main'
A quick fix would be to swap out
it.path?.pathString?.contains(versionString)
for
it.path?.pathString?.contains("$${versionString}|") || it.path?.pathString?.endsWith("$${versionString}")
but ultimately, a path.getVersion() method would remove the need for PathService to need to know and parse the syntax of a Path
There is a class PathStringUtils that could be replaced by implementing these functions in Path
PathService uses PathStringUtils and could use Path instead
PathService.findItemForPath uses a substring match for finding whether a path belongs to a particular version, which may match areas that are not about the version of a path
e.g.
fo:Test folder|dm:main datamodel $1.0.0|dc:label for dataclass
fo:main folder|dm:datamodel label $1.0.0|dc:label for dataclass
would both match the version string 'main'
A quick fix would be to swap out
it.path?.pathString?.contains(versionString)
for
it.path?.pathString?.contains("$${versionString}|") || it.path?.pathString?.endsWith("$${versionString}")
but ultimately, a path.getVersion() method would remove the need for PathService to need to know and parse the syntax of a Path