Problem is like uri.getQueryParameters() method is converting Character(+) into space which I am trying to avoid. Below is the uri before
"http://localhost:8081/service/linear/test/?id=test+QYY"
after
uri.getQueryParameters()
will remove the + and it will replace with space
so the id now doesn't contains the + instead it contains the space as below
"http://localhost:8081/service/linear/test/?id=test QYY"
Notes - uri is a object of UriInfo which is defined by package javax.ws.rs.core