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:
Oliver Gierke
2015-08-13 12:37:30 +02:00
parent 6775d11c65
commit cc1aa713f9
2 changed files with 22 additions and 1 deletions

View File

@@ -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());
}
}