Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.19.0
-
Fix Version/s: 2.20.0
-
Component/s: camel-core, rest
-
Labels:None
-
Estimated Complexity:Novice
Description
String p1 = requestPath.toLowerCase(Locale.ENGLISH); String p2 = consumerPath.toLowerCase(Locale.ENGLISH); if (p1.equals(p2)) { return true; } if (matchOnUriPrefix && p1.startsWith(p2)) { return true; } return false;
we can improve to:
if (requestPath.equalsIgnoreCase(consumerPath)) { return true; } return matchOnUriPrefix && requestPath.regionMatches(true, 0, consumerPath, 0, consumerPath.length());
Attachments
Issue Links
- links to