public static List<Response> executeBatchAndWait(RequestBatch requests){
  Validate.notEmptyAndContainsNoNulls(requests,"requests");
  HttpURLConnection connection=null;
  try {
    connection=toHttpConnection(requests);
  }
 catch (  Exception ex) {
    List<Response> responses=Response.constructErrorResponses(requests.getRequests(),null,new FacebookException(ex));
    runCallbacks(requests,responses);
    return responses;
  }
  List<Response> responses=executeConnectionAndWait(connection,requests);
  return responses;
}

public static List < Response > executeBatchAndWait ( RequestBatch requests ) { Validate . notEmptyAndContainsNoNulls ( requests , "requests" ) ; HttpURLConnection connection = null ; try { connection = toHttpConnection ( requests ) ; } catch ( Exception ex ) { List < Response > responses = Response . constructErrorResponses ( requests . getRequests ( ) , null , new FacebookException ( ex ) ) ; runCallbacks ( requests , responses ) ; return responses ; } List < Response > responses = executeConnectionAndWait ( connection , requests ) ; return responses ; }
executes requests on the current thread as a single batch and returns the responses . < p / > this should only be used if you have transitioned off the ui thread .
