@@ -163,7 +163,7 @@ public List<Entity> add(PartialEntity... entities) {
163163 if (entity instanceof Entity ) {
164164 completeEntity = (Entity ) entity ;
165165 } else if (entity .key () instanceof Key ) {
166- completeEntity = entity . toEntity ((Key ) entity .key ());
166+ completeEntity = Entity . builder ((Key ) entity .key (), entity ). build ( );
167167 }
168168 if (completeEntity != null ) {
169169 if (completeEntities .put (completeEntity .key (), completeEntity ) != null ) {
@@ -186,7 +186,7 @@ public List<Entity> add(PartialEntity... entities) {
186186 if (completeEntity != null ) {
187187 responseBuilder .add (completeEntity );
188188 } else {
189- responseBuilder .add (entity . toEntity (Key .fromPb (allocatedKeys .next ())));
189+ responseBuilder .add (Entity . builder (Key .fromPb (allocatedKeys .next ()), entity ). build ( ));
190190 }
191191 }
192192 return responseBuilder .build ();
@@ -366,11 +366,12 @@ void rollbackTransaction(ByteString transaction) {
366366 rollback (requestPb .build ());
367367 }
368368
369- DatastoreV1 . RollbackResponse rollback (final DatastoreV1 .RollbackRequest requestPb ) {
369+ void rollback (final DatastoreV1 .RollbackRequest requestPb ) {
370370 try {
371- return RetryHelper .runWithRetries (new Callable <DatastoreV1 .RollbackResponse >() {
372- @ Override public DatastoreV1 .RollbackResponse call () throws DatastoreException {
373- return datastore .rollback (requestPb );
371+ RetryHelper .runWithRetries (new Callable <Void >() {
372+ @ Override public Void call () throws DatastoreException {
373+ datastore .rollback (requestPb );
374+ return null ;
374375 }
375376 }, retryParams , EXCEPTION_HANDLER );
376377 } catch (RetryHelperException e ) {
0 commit comments