DATACMNS-750 - Fixed part creation in query methods that have keywords in property paths.
If a keyword was contained in a complex property path (like In in SomeInfo), the property path was invalidly cut of in the middle. We now simply use the length of the keyword to extract the actual property from the candidate. This should be faster anyway as it doesn't require another lookup of the pattern in the source candidate. Related pull request: #136.
This commit is contained in:
@@ -298,7 +298,7 @@ public class Part {
|
||||
|
||||
for (String keyword : keywords) {
|
||||
if (candidate.endsWith(keyword)) {
|
||||
return candidate.substring(0, candidate.indexOf(keyword));
|
||||
return candidate.substring(0, candidate.length() - keyword.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user