public static String decodeUtf8UriParam(final String value){
  if (value != null) {
    if (value.indexOf('%') == -1) {
      return value;
    }
    final String uri=value.replace("+","%2B");
    try {
      return URLDecoder.decode(uri,"UTF-8");
    }
 catch (    UnsupportedEncodingException e) {
      throw new RuntimeException(e);
    }
  }
  return null;
}

public static String decodeUtf8UriParam ( final String value ) { if ( value != null ) { if ( value . indexOf ( '%' ) == - 1 ) { return value ; } final String uri = value . replace ( "+" , "%2B" ) ; try { return URLDecoder . decode ( uri , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } } return null ; }
ensure that encoded uri parameters are properly decoded . uses urldecoder as a work horse but accounts for ' + ' being a plus character and not space as per form encoding standards .
