org.linkedin.util-core/src/main/java/org/linkedin/util/url/QueryBuilder.java
private void validateQuery(String query) throws URISyntaxException
  {
    if(query.length() == 0)
      return;

    Iterator<String> iter = SS.splitToIterator(query);

    while(iter.hasNext())
    {
      String s = iter.next();
      if(s.length() > 0)
      {
        int idx = s.indexOf('=');
        if(idx == -1)
          throw new URISyntaxException(query, "missing equal sign in " + s);
        if(s.lastIndexOf('=') != idx)
          throw new URISyntaxException(query, "extra equal sign in " + s);
      }
    }
  }
private void validateQuery(String query) throws URISyntaxException
  {
    if(query.length() == 0)
      return;

    Iterator<String> iter = SS.splitToIterator(query);

    while(iter.hasNext())
    {
      String s = iter.next();
      if(s.length() > 0)
      {
        int idx = s.indexOf('=');
        if(idx == -1)
          throw new URISyntaxException(query, "missing equal sign in " + s);
        if(s.lastIndexOf('=') != idx)
          throw new URISyntaxException(query, "extra equal sign in " + s);
      }
    }
  }
Internal method in charge of validating the query provided. Exception
when query is not valid.

@param query the query to validate
@throws URISyntaxException if query invalid