jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Alperovich <notificati...@github.com>
Subject [jclouds] Move QueryParam encoding to a separate class. (#872)
Date Tue, 27 Oct 2015 01:50:43 GMT
The patch implements a QueryValue class, which encodes the underlying
value based on whether the "encoded" flag is set. This class is used
by the RestAnnotationProcessor to propagate the @Encoded value set on
any parameters.

Since the encoding is now handled by the QueryValue instances, we
should no longer call encodeQueryLine() in the URI builder and instead
call buildQueryLine(). The caveat is that we need to make sure all of
the parameters that may need to be encoded are converted to QueryValue
objects. This is done by converting Object instances to QueryValue by
an instance of the TransformObjectToQueryValue when adding any query
parameters to the URI.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/872

-- Commit Summary --

  * Move QueryParam encoding to a separate class.

-- File Changes --

    M core/src/main/java/org/jclouds/http/Uris.java (50)
    A core/src/main/java/org/jclouds/http/utils/QueryValue.java (62)
    M core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java (33)
    M core/src/test/java/org/jclouds/http/UrisTest.java (39)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/872.patch
https://github.com/jclouds/jclouds/pull/872.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/872

Mime
View raw message