cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6189] One more very minor optimization
Date Wed, 14 Jan 2015 20:50:07 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2d637291f -> eab9907c7


[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/eab9907c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/eab9907c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/eab9907c

Branch: refs/heads/master
Commit: eab9907c7fe37b7bfd9e329714588c073e88df07
Parents: 2d63729
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Wed Jan 14 20:48:47 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Wed Jan 14 20:48:47 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/eab9907c/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;


Mime
View raw message