@@ -51,26 +51,26 @@ public class InternalBatchDriverImpl extends BaseArangoDriverImpl {
5151
5252 public DefaultEntity executeBatch (List <BatchPart > callStack , String defaultDataBase ) throws ArangoException {
5353
54- StringBuilder body = new StringBuilder () ;
54+ String body = "" ;
5555
5656 Map <String , InvocationObject > resolver = new HashMap <String , InvocationObject >();
5757
5858 for (BatchPart bp : callStack ) {
59- body . append ( "--" ). append ( delimiter ). append ( newline ) ;
60- body . append ( "Content-Type: application/x-arango-batchpart" ). append ( newline ) ;
61- body . append ( "Content-Id: " ). append ( bp .getId ()). append ( newline ). append ( newline ) ;
62- body . append ( bp .getMethod ()). append ( " " ). append ( bp .getUrl ()). append ( " " ). append ( "HTTP/1.1" ). append ( newline ) ;
63- body . append ( "Host: " ). append ( this .configure .getArangoHost ().getHost ()). append ( newline ). append ( newline ) ;
64- body . append ( bp .getBody () == null ? "" : bp .getBody ()). append ( newline ). append ( newline ) ;
59+ body += "--" + delimiter + newline ;
60+ body += "Content-Type: application/x-arango-batchpart" + newline ;
61+ body += "Content-Id: " + bp .getId () + newline + newline ;
62+ body += bp .getMethod () + " " + bp .getUrl () + " " + "HTTP/1.1" + newline ;
63+ body += "Host: " + this .configure .getArangoHost ().getHost () + newline + newline ;
64+ body += bp .getBody () == null ? "" : bp .getBody () + newline + newline ;
6565 resolver .put (bp .getId (), bp .getInvocationObject ());
6666 }
67- body . append ( "--" ). append ( delimiter ). append ( "--" ) ;
67+ body += "--" + delimiter + "--" ;
6868
6969 Map <String , Object > headers = new HashMap <String , Object >();
7070 headers .put ("Content-Type" , "multipart/form-data; boundary=" + delimiter );
7171
7272 HttpResponseEntity res = httpManager .doPostWithHeaders (createEndpointUrl (defaultDataBase , "/_api/batch" ), null ,
73- null , headers , body . toString () );
73+ null , headers , body );
7474
7575 String data = res .getText ();
7676 res .setContentType ("application/json" );
0 commit comments