Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 23fa3f6d7 -> aea5e2f96
[CXF-6189] One more very minor optimization Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/aea5e2f9 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/aea5e2f9 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/aea5e2f9 Branch: refs/heads/3.0.x-fixes Commit: aea5e2f9611ce88c699755f1324fdaac30969ccd Parents: 23fa3f6 Author: Sergey Beryozkin <[email protected]> Authored: Wed Jan 14 20:48:47 2015 +0000 Committer: Sergey Beryozkin <[email protected]> Committed: Wed Jan 14 20:51:13 2015 +0000 ---------------------------------------------------------------------- core/src/main/java/org/apache/cxf/common/util/UrlUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/aea5e2f9/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java b/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java index fc9ac28..8b2518e 100644 --- a/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java +++ b/core/src/main/java/org/apache/cxf/common/util/UrlUtils.java @@ -70,10 +70,12 @@ public final class UrlUtils { boolean needDecode = false; int escapesCount = 0; - for (int i = 0; i < value.length(); i++) { - char ch = value.charAt(i); + int i = 0; + while (i < value.length()) { + char ch = value.charAt(i++); if (ch == ESCAPE_CHAR) { escapesCount += 1; + i += 2; needDecode = true; } else if (!isPath && ch == PLUS_CHAR) { needDecode = true;
