# Double Encoding for the space in OSLCQueryParamater

**URL:** <https://forum.open-services.net/t/double-encoding-for-the-space-in-oslcqueryparamater/395>\
**Category:** Lyo\
**Created:** [June 22, 2020, 8:00am UTC](https://forum.open-services.net/t/double-encoding-for-the-space-in-oslcqueryparamater/395 "2020-06-22T08:00:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Palrajjayaraj](https://forum.open-services.net/letter_avatar_proxy/v4/letter/p/49beb7/32.png) [@Palrajjayaraj](https://forum.open-services.net/u/Palrajjayaraj)\
**Post date:** [June 25, 2020, 9:55am UTC](https://forum.open-services.net/t/double-encoding-for-the-space-in-oslcqueryparamater/395/3 "2020-06-25T09:55:09Z")

</div>

Thanks Jad for the reply.

Actually, I’m not encoding the where clause before setting in the ‘OslcQueryParameters’.

I think I have not explained myself, clearer.

I did a little debugging and below is the following flow, which encodes the where clause twice.

When I call API OslcQueryParameters.setWhere(“oslc:shortId in [100,101]”), the API in turn calls the private OslcQueryParameters.encodeQueryParams(String), which converts the given string to “oslc%3AshortId+in+%5B463557%2C463558%5D”.

When the constructor OslcQuery.OslcQuery(OslcClient, String, OslcQueryParameters) is called with the above formed query parameter, ‘OslcQuery.queryUrl’ attribute is formed by calling the OslcQuery.getQueryUrl() API. which in turn calls the org.glassfish.jersey.uri.internal.JerseyUriBuilder.build(Object…) API, which internally calls the org.glassfish.jersey.uri.internal.JerseyUriBuilder.\_build(boolean encode, boolean encodeSlashInPath, Object…) API, which again encodes the where clause.

Thanks,  
Palraj.

---

_[View the full topic](https://forum.open-services.net/t/double-encoding-for-the-space-in-oslcqueryparamater/395)._
