Lines 212-217
Link Here
|
212 |
return; |
212 |
return; |
213 |
} |
213 |
} |
214 |
|
214 |
|
|
|
215 |
if (validateMatchRule(pattern, RULE_CAMELCASE_MATCH) == RULE_CAMELCASE_MATCH) { |
216 |
matchRule = RULE_CAMELCASE_MATCH; |
217 |
stringPattern = pattern; |
218 |
return; |
219 |
} |
220 |
|
215 |
if (last == END_SYMBOL) { |
221 |
if (last == END_SYMBOL) { |
216 |
matchRule = RULE_EXACT_MATCH; |
222 |
matchRule = RULE_EXACT_MATCH; |
217 |
stringPattern = pattern.substring(0, length - 1); |
223 |
stringPattern = pattern.substring(0, length - 1); |
Lines 224-235
Link Here
|
224 |
return; |
230 |
return; |
225 |
} |
231 |
} |
226 |
|
232 |
|
227 |
if (validateMatchRule(pattern, RULE_CAMELCASE_MATCH) == RULE_CAMELCASE_MATCH) { |
|
|
228 |
matchRule = RULE_CAMELCASE_MATCH; |
229 |
stringPattern = pattern; |
230 |
return; |
231 |
} |
232 |
|
233 |
matchRule = RULE_PREFIX_MATCH; |
233 |
matchRule = RULE_PREFIX_MATCH; |
234 |
stringPattern = pattern; |
234 |
stringPattern = pattern; |
235 |
|
235 |
|
Lines 483-495
Link Here
|
483 |
// name |
483 |
// name |
484 |
while (true) { |
484 |
while (true) { |
485 |
if (iName == nameEnd) { |
485 |
if (iName == nameEnd) { |
486 |
// We have exhausted name (and not pattern), so it's not a |
486 |
if (patternChar == END_SYMBOL || patternChar == BLANK) |
487 |
// match |
487 |
return true; |
488 |
return false; |
488 |
return false; |
489 |
} |
489 |
} |
490 |
|
490 |
|
491 |
nameChar = name.charAt(iName); |
491 |
nameChar = name.charAt(iName); |
492 |
|
492 |
|
|
|
493 |
if (patternChar == END_SYMBOL || patternChar == BLANK) { |
494 |
if (isNameCharAllowed(nameChar)) { |
495 |
return false; |
496 |
} |
497 |
iName++; |
498 |
continue; |
499 |
} |
500 |
|
493 |
if (!isNameCharAllowed(nameChar)) { |
501 |
if (!isNameCharAllowed(nameChar)) { |
494 |
// nameChar is lowercase |
502 |
// nameChar is lowercase |
495 |
iName++; |
503 |
iName++; |
Lines 516-522
Link Here
|
516 |
* @return true if patternChar is in set of allowed characters for pattern |
524 |
* @return true if patternChar is in set of allowed characters for pattern |
517 |
*/ |
525 |
*/ |
518 |
protected boolean isPatternCharAllowed(char patternChar) { |
526 |
protected boolean isPatternCharAllowed(char patternChar) { |
519 |
return Character.isUpperCase(patternChar); |
527 |
return Character.isUpperCase(patternChar) || patternChar == END_SYMBOL || patternChar == BLANK; |
520 |
} |
528 |
} |
521 |
|
529 |
|
522 |
/** |
530 |
/** |