@SuppressWarnings("resource") private static String parseGwtRpcMethodName(InputStream stream,String charEncoding){
  try {
    final Scanner scanner;
    if (charEncoding == null) {
      scanner=new Scanner(stream);
    }
 else {
      scanner=new Scanner(stream,charEncoding);
    }
    scanner.useDelimiter(GWT_RPC_SEPARATOR_CHAR_PATTERN);
    scanner.next();
    scanner.next();
    scanner.next();
    scanner.next();
    scanner.next();
    scanner.next();
    return "." + scanner.next();
  }
 catch (  final NoSuchElementException e) {
    LOG.debug("Unable to parse GWT-RPC request",e);
    return null;
  }
}

@ SuppressWarnings ( "resource" ) private static String parseGwtRpcMethodName ( InputStream stream , String charEncoding ) { try { final Scanner scanner ; if ( charEncoding == null ) { scanner = new Scanner ( stream ) ; } else { scanner = new Scanner ( stream , charEncoding ) ; } scanner . useDelimiter ( GWT_RPC_SEPARATOR_CHAR_PATTERN ) ; scanner . next ( ) ; scanner . next ( ) ; scanner . next ( ) ; scanner . next ( ) ; scanner . next ( ) ; scanner . next ( ) ; return "." + scanner . next ( ) ; } catch ( final NoSuchElementException e ) { LOG . debug ( "Unable to parse GWT-RPC request" , e ) ; return null ; } }
try to parse gwt - rpc method name from request body stream . does not close the stream .
