示例#1
0
 /**
  * Returns the non-empty value of the given required query string parameter.
  *
  * <p>If this parameter occurs multiple times in the URL, only the last value is returned and
  * others are silently ignored.
  *
  * @param paramname Name of the query string parameter to get.
  * @return The value of the parameter.
  * @throws BadRequestException if this query string parameter wasn't passed or if its last
  *     occurrence had an empty value ({@code &amp;a=}).
  */
 public String getRequiredQueryStringParam(final String paramname) throws BadRequestException {
   final String value = getQueryStringParam(paramname);
   if (value == null || value.isEmpty()) {
     throw BadRequestException.missingParameter(paramname);
   }
   return value;
 }