You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2021/06/18 01:47:10 UTC

[cxf] branch 3.3.x-fixes updated (244ee9b -> e49e1ec)

This is an automated email from the ASF dual-hosted git repository.

reta pushed a change to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 244ee9b  Recording .gitmergeinfo Changes
     new 1495a7c  Added more UriBuilderImpl tests and documentation clarifications
     new e49e1ec  Recording .gitmergeinfo Changes

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo                                         |  4 ++++
 .../org/apache/cxf/jaxrs/impl/UriBuilderImpl.java     |  9 +++++++++
 .../org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java | 19 +++++++++++++++++++
 3 files changed, 32 insertions(+)

[cxf] 02/02: Recording .gitmergeinfo Changes

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit e49e1ec35a9b2b95b5214324834cfc2a813af55f
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Thu Jun 17 21:22:33 2021 -0400

    Recording .gitmergeinfo Changes
---
 .gitmergeinfo | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index 24adff9..8af95bb 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -607,6 +607,7 @@ B e2fdfa58006a2813dedb0fdb4ce8d9542935c060
 B e4b7097b19388124883191bc32300ee6562849b4
 B e55f47464ad82db4cbe19b33748b56edc45f20ca
 B e5b1b36d382586ff9b12c53409ec714ff12e1962
+B e5bf361a17db43fab159e811b8c6ec742dfb6e3d
 B e6096179e424da3297116c3e4e9e5b178ff2e368
 B e62f626ae1274157400b49490bffb242757b6577
 B e68d173f7d3ca15603a8f9eff9c8b39783207f70
@@ -779,6 +780,7 @@ M 400e003302aab3b83b630a006dbe66324c7ce0d8
 M 40f52264a62fdad1d0971e7ebdbd86848367f7e8
 M 4162189dabdb22aec54dc3c5ae93cf42b0575d3d
 M 420f6f35915cbd50cc175a6a10359125516b0213
+M 44f9806d6a1088531ec27da0af76a4cb2771222e
 M 46142a21738c072e5bd369d5c8060b0430e09b0c
 M 464e41a12dea11a00c86a370b31d7a7f009cb8e9
 M 4699995c6ef392a98615382a5824dda0d1bbe9bf
@@ -824,6 +826,7 @@ M 6b8368ba32ded81492d258940f447845f84bc474
 M 6df728589b4c50cf5d1d5417d517a7d26b15a9bf
 M 6e828d6f0fea652231d0cdc9990169c3583ad03a
 M 6ea58a013295a5cad998a814f7ec33ebf34fccfb
+M 6ec36084f23b5b9a5e41659b68aa8a24838f32d3
 M 6f08487b2b02d4fd4c95b232eff839c6066fa668
 M 6f79756afa8a0cf90a7132929cc387f6f1d21ba0
 M 6fb1e66cb2336c0e4564e8ddf02b16e9d43d53bd
@@ -839,6 +842,7 @@ M 7971b506283502c26aafb97c0f6e50633f126cdd
 M 79f68ec4acb91c754e1b7d118f844d787a5ce888
 M 7a05e4fb0b67a89b86ed6eee68b9416005d6f631
 M 7a188f96fee4923b40e59529dd0bd177983bf24c
+M 7a42ec5f651ed991e856f5d8b418b7cbaa318b7a
 M 7a655b49fd6d432127a55b38f15c1212f7064196
 M 7aa6e0a402b8ce7dfff8a931a507b884d7152cea
 M 7b50181ebc445bb84d3463b284643432399bc0f8

[cxf] 01/02: Added more UriBuilderImpl tests and documentation clarifications

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 1495a7c1e308b5f8d788664465dccbcf853d4b5b
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Thu Jun 17 20:32:33 2021 -0400

    Added more UriBuilderImpl tests and documentation clarifications
    
    (cherry picked from commit 20576fbaa10c32a465b9d8c3383c5d4aac24d93d)
    (cherry picked from commit 6ec36084f23b5b9a5e41659b68aa8a24838f32d3)
---
 .../org/apache/cxf/jaxrs/impl/UriBuilderImpl.java     |  9 +++++++++
 .../org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java | 19 +++++++++++++++++++
 2 files changed, 28 insertions(+)

diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
index fc614b5..ef49a29 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
@@ -46,6 +46,15 @@ import org.apache.cxf.jaxrs.model.URITemplate;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 
+/**
+ * Implements the {@link UriBuilder} abstract class. A few notes with respect to CXF specifics:
+ * <ul>
+ *   <li>it uses standard {@link URI} internally, so it does not conform to 
+ *   RFC-3986 which {@link UriBuilder} mandates</li>
+ *   <li>it encodes URI components if it encounters '%XX' pattern within name (if applicable) or value (those
+ *   are treated as partially encoded)</li>
+ *  </ul
+ */
 public class UriBuilderImpl extends UriBuilder implements Cloneable {
     private static final String EXPAND_QUERY_VALUE_AS_COLLECTION = "expand.query.value.as.collection";
 
diff --git a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
index 0fc683e..bef65a4 100644
--- a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
+++ b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
@@ -1832,4 +1832,23 @@ public class UriBuilderImplTest {
         
         assertEquals(expected, uri.toString());
     }
+    
+    @Test
+    public void queryParamToTemplatePartiallyEncoded() {
+        final String template = UriBuilder
+            .fromUri("my/path")
+            .queryParam("p", "%250%")
+            .toTemplate();
+        assertEquals("my/path?p=%250%25", template);
+    }
+    
+    @Test
+    public void queryParamToTemplateNotEncoded() {
+        final String template = UriBuilder
+            .fromUri("my/path")
+            .queryParam("p", "{p}")
+            .resolveTemplate("p", "%250%")
+            .toTemplate();
+        assertEquals("my/path?p=%25250%25", template);
+    }
 }
\ No newline at end of file