You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2017/12/19 06:55:59 UTC

[GitHub] rhtyd closed pull request #1439: Changed Void Methods to void

rhtyd closed pull request #1439: Changed Void Methods to void
URL: https://github.com/apache/cloudstack/pull/1439
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
index cdcab754e91..a7d985c783f 100644
--- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
+++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
@@ -164,40 +164,30 @@ public void copyAsync(DataObject srcData, DataObject destData, Host destHost, As
 
     private void validate(SnapshotInfo snapshotInfo) {
         long volumeId = snapshotInfo.getVolumeId();
-
         VolumeVO volumeVO = _volumeDao.findByIdIncludingRemoved(volumeId);
-
         if (volumeVO.getFormat() != ImageFormat.VHD) {
             throw new CloudRuntimeException("Only the " + ImageFormat.VHD.toString() + " image type is currently supported.");
         }
     }
 
-    private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback<CopyCommandResult> callback) {
+    private void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback<CopyCommandResult> callback) {
         try {
             snapshotInfo.processEvent(Event.CopyingRequested);
         }
         catch (Exception ex) {
             throw new CloudRuntimeException("This snapshot is not currently in a state where it can be used to create a template.");
         }
-
         HostVO hostVO = getHost(snapshotInfo.getDataStore().getId());
         DataStore srcDataStore = snapshotInfo.getDataStore();
-
         String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString());
         int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue()));
         CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value());
-
         String errMsg = null;
-
         CopyCmdAnswer copyCmdAnswer = null;
-
         try {
             _volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore);
-
             Map<String, String> srcDetails = getSnapshotDetails(_storagePoolDao.findById(srcDataStore.getId()), snapshotInfo);
-
             copyCommand.setOptions(srcDetails);
-
             copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand);
         }
         catch (Exception ex) {
@@ -210,7 +200,6 @@ private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, Templat
             catch (Exception ex) {
                 s_logger.debug(ex.getMessage(), ex);
             }
-
             if (copyCmdAnswer == null || !copyCmdAnswer.getResult()) {
                 if (copyCmdAnswer != null && copyCmdAnswer.getDetails() != null && !copyCmdAnswer.getDetails().isEmpty()) {
                     errMsg = copyCmdAnswer.getDetails();
@@ -219,7 +208,6 @@ private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, Templat
                     errMsg = "Unable to perform host-side operation";
                 }
             }
-
             try {
                 if (errMsg == null) {
                     snapshotInfo.processEvent(Event.OperationSuccessed);
@@ -232,17 +220,12 @@ private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, Templat
                 s_logger.debug(ex.getMessage(), ex);
             }
         }
-
         CopyCommandResult result = new CopyCommandResult(null, copyCmdAnswer);
-
         result.setResult(errMsg);
-
         callback.complete(result);
-
-        return null;
     }
 
-    private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snapshotInfo, VolumeInfo volumeInfo, AsyncCompletionCallback<CopyCommandResult> callback) {
+    private void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snapshotInfo, VolumeInfo volumeInfo, AsyncCompletionCallback<CopyCommandResult> callback) {
         try {
             // at this point, the snapshotInfo and volumeInfo should have the same disk offering ID (so either one should be OK to get a DiskOfferingVO instance)
             DiskOfferingVO diskOffering = _diskOfferingDao.findByIdIncludingRemoved(volumeInfo.getDiskOfferingId());
@@ -250,11 +233,8 @@ private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snap
 
             // update the volume's hv_ss_reserve (hypervisor snapshot reserve) from a disk offering (used for managed storage)
             _volumeService.updateHypervisorSnapshotReserveForVolume(diskOffering, volumeInfo.getId(), snapshot.getHypervisorType());
-
             AsyncCallFuture<VolumeApiResult> future = _volumeService.createVolumeAsync(volumeInfo, volumeInfo.getDataStore());
-
             VolumeApiResult result = future.get();
-
             if (result.isFailed()) {
                 s_logger.debug("Failed to create a volume: " + result.getResult());
 
@@ -266,31 +246,21 @@ private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snap
         }
 
         volumeInfo = _volumeDataFactory.getVolume(volumeInfo.getId(), volumeInfo.getDataStore());
-
         volumeInfo.processEvent(Event.MigrationRequested);
-
         volumeInfo = _volumeDataFactory.getVolume(volumeInfo.getId(), volumeInfo.getDataStore());
-
         HostVO hostVO = getHost(snapshotInfo.getDataStore().getId());
-
         String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString());
         int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue()));
         CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), volumeInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value());
-
         CopyCmdAnswer copyCmdAnswer = null;
-
+        
         try {
             _volumeService.grantAccess(snapshotInfo, hostVO, snapshotInfo.getDataStore());
             _volumeService.grantAccess(volumeInfo, hostVO, volumeInfo.getDataStore());
-
             Map<String, String> srcDetails = getSnapshotDetails(_storagePoolDao.findById(snapshotInfo.getDataStore().getId()), snapshotInfo);
-
             copyCommand.setOptions(srcDetails);
-
             Map<String, String> destDetails = getVolumeDetails(volumeInfo);
-
             copyCommand.setOptions2(destDetails);
-
             copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand);
         }
         catch (Exception ex) {
@@ -303,7 +273,6 @@ private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snap
             catch (Exception ex) {
                 s_logger.debug(ex.getMessage(), ex);
             }
-
             try {
                 _volumeService.revokeAccess(volumeInfo, hostVO, volumeInfo.getDataStore());
             }
@@ -311,9 +280,7 @@ private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snap
                 s_logger.debug(ex.getMessage(), ex);
             }
         }
-
         String errMsg = null;
-
         if (copyCmdAnswer == null || !copyCmdAnswer.getResult()) {
             if (copyCmdAnswer != null && copyCmdAnswer.getDetails() != null && !copyCmdAnswer.getDetails().isEmpty()) {
                 errMsg = copyCmdAnswer.getDetails();
@@ -322,14 +289,9 @@ private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snap
                 errMsg = "Unable to perform host-side operation";
             }
         }
-
         CopyCommandResult result = new CopyCommandResult(null, copyCmdAnswer);
-
         result.setResult(errMsg);
-
         callback.complete(result);
-
-        return null;
     }
 
     private Map<String, String> getSnapshotDetails(StoragePoolVO storagePoolVO, SnapshotInfo snapshotInfo) {
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index a1d10e32807..47ffb7295a3 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -589,7 +589,7 @@ public void associateCrosszoneTemplatesToZone(long dcId) {
         return null;
     }
 
-    protected Void createTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> callback, TemplateOpContext<TemplateApiResult> context) {
+    protected void createTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> callback, TemplateOpContext<TemplateApiResult> context) {
         TemplateObject template = context.getTemplate();
         AsyncCompletionCallback<TemplateApiResult> parentCallback = context.getParentCallback();
         TemplateApiResult result = new TemplateApiResult(template);
@@ -600,9 +600,7 @@ protected Void createTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImp
             if (parentCallback != null) {
                 parentCallback.complete(result);
             }
-            return null;
         }
-
         try {
             template.processEvent(ObjectInDataStoreStateMachine.Event.OperationSuccessed);
         } catch (Exception e) {
@@ -610,13 +608,10 @@ protected Void createTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImp
             if (parentCallback != null) {
                 parentCallback.complete(result);
             }
-            return null;
         }
-
         if (parentCallback != null) {
             parentCallback.complete(result);
         }
-        return null;
     }
 
     @Override
@@ -634,7 +629,7 @@ protected Void createTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImp
         return future;
     }
 
-    public Void deleteTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, CommandResult> callback, TemplateOpContext<TemplateApiResult> context) {
+    public void deleteTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl, CommandResult> callback, TemplateOpContext<TemplateApiResult> context) {
         CommandResult result = callback.getResult();
         TemplateObject vo = context.getTemplate();
         if (result.isSuccess()) {
@@ -646,7 +641,6 @@ public Void deleteTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl,
         apiResult.setResult(result.getResult());
         apiResult.setSuccess(result.isSuccess());
         context.future.complete(apiResult);
-        return null;
     }
 
     private AsyncCallFuture<TemplateApiResult> copyAsync(DataObject source, TemplateInfo template, DataStore store) {
@@ -687,7 +681,7 @@ public Void deleteTemplateCallback(AsyncCallbackDispatcher<TemplateServiceImpl,
         return future;
     }
 
-    protected Void syncTemplateCallBack(AsyncCallbackDispatcher<TemplateServiceImpl, CopyCommandResult> callback, TemplateOpContext<TemplateApiResult> context) {
+    protected void syncTemplateCallBack(AsyncCallbackDispatcher<TemplateServiceImpl, CopyCommandResult> callback, TemplateOpContext<TemplateApiResult> context) {
         TemplateInfo destTemplate = context.getTemplate();
         CopyCommandResult result = callback.getResult();
         AsyncCallFuture<TemplateApiResult> future = context.getFuture();
@@ -706,8 +700,6 @@ protected Void syncTemplateCallBack(AsyncCallbackDispatcher<TemplateServiceImpl,
             res.setResult(e.toString());
             future.complete(res);
         }
-
-        return null;
     }
 
     // This routine is used to push templates currently on cache store, but not in region store to region store.
@@ -847,7 +839,7 @@ private String generateCopyUrl(TemplateInfo srcTemplate) {
         return copyAsync(srcTemplate, srcTemplate, (DataStore)pool);
     }
 
-    protected Void copyTemplateCallBack(AsyncCallbackDispatcher<TemplateServiceImpl, CopyCommandResult> callback, TemplateOpContext<TemplateApiResult> context) {
+    protected void copyTemplateCallBack(AsyncCallbackDispatcher<TemplateServiceImpl, CopyCommandResult> callback, TemplateOpContext<TemplateApiResult> context) {
         TemplateInfo destTemplate = context.getTemplate();
         CopyCommandResult result = callback.getResult();
         AsyncCallFuture<TemplateApiResult> future = context.getFuture();
@@ -865,11 +857,9 @@ protected Void copyTemplateCallBack(AsyncCallbackDispatcher<TemplateServiceImpl,
             res.setResult(e.toString());
             future.complete(res);
         }
-
-        return null;
     }
 
-    protected Void copyTemplateCrossZoneCallBack(AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> callback, TemplateOpContext<TemplateApiResult> context) {
+    protected void copyTemplateCrossZoneCallBack(AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> callback, TemplateOpContext<TemplateApiResult> context) {
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Performing copy template cross zone callback after completion");
         }
@@ -890,8 +880,6 @@ protected Void copyTemplateCrossZoneCallBack(AsyncCallbackDispatcher<TemplateSer
             res.setResult(e.toString());
             future.complete(res);
         }
-
-        return null;
     }
 
     @Override
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
index f7f044fa8f1..004316830d3 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
@@ -122,7 +122,7 @@ public RevertSnapshotContext(AsyncCompletionCallback<T> callback, SnapshotInfo s
 
     }
 
-    protected Void createSnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CreateCmdResult> callback, CreateSnapshotContext<CreateCmdResult> context) {
+    protected void createSnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CreateCmdResult> callback, CreateSnapshotContext<CreateCmdResult> context) {
         CreateCmdResult result = callback.getResult();
         SnapshotObject snapshot = (SnapshotObject)context.snapshot;
         AsyncCallFuture<SnapshotResult> future = context.future;
@@ -138,9 +138,7 @@ protected Void createSnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotServi
 
             snapResult.setResult(result.getResult());
             future.complete(snapResult);
-            return null;
         }
-
         try {
             snapshot.processEvent(Event.OperationSuccessed, result.getAnswer());
             snapshot.processEvent(Snapshot.Event.OperationSucceeded);
@@ -153,9 +151,7 @@ protected Void createSnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotServi
                 s_logger.debug("Failed to change snapshot state: " + e1.toString());
             }
         }
-
         future.complete(snapResult);
-        return null;
     }
 
     @Override
@@ -296,7 +292,7 @@ public SnapshotInfo backupSnapshot(SnapshotInfo snapshot) {
 
     }
 
-    protected Void copySnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CopyCommandResult> callback, CopySnapshotContext<CommandResult> context) {
+    protected void copySnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CopyCommandResult> callback, CopySnapshotContext<CommandResult> context) {
         CopyCommandResult result = callback.getResult();
         SnapshotInfo destSnapshot = context.destSnapshot;
         SnapshotObject srcSnapshot = (SnapshotObject)context.srcSnapshot;
@@ -316,9 +312,7 @@ protected Void copySnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotService
             }
             snapResult.setResult(result.getResult());
             future.complete(snapResult);
-            return null;
         }
-
         try {
             CopyCmdAnswer copyCmdAnswer = (CopyCmdAnswer)result.getAnswer();
             destSnapshot.processEvent(Event.OperationSuccessed, copyCmdAnswer);
@@ -330,11 +324,9 @@ protected Void copySnapshotAsyncCallback(AsyncCallbackDispatcher<SnapshotService
             snapResult.setResult(e.toString());
             future.complete(snapResult);
         }
-        return null;
     }
 
-    protected Void deleteSnapshotCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CommandResult> callback, DeleteSnapshotContext<CommandResult> context) {
-
+    protected void deleteSnapshotCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CommandResult> callback, DeleteSnapshotContext<CommandResult> context) {
         CommandResult result = callback.getResult();
         AsyncCallFuture<SnapshotResult> future = context.future;
         SnapshotInfo snapshot = context.snapshot;
@@ -354,11 +346,9 @@ protected Void deleteSnapshotCallback(AsyncCallbackDispatcher<SnapshotServiceImp
             res.setResult(e.toString());
         }
         future.complete(res);
-        return null;
     }
 
-    protected Void revertSnapshotCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CommandResult> callback, RevertSnapshotContext<CommandResult> context) {
-
+    protected void revertSnapshotCallback(AsyncCallbackDispatcher<SnapshotServiceImpl, CommandResult> callback, RevertSnapshotContext<CommandResult> context) {
         CommandResult result = callback.getResult();
         AsyncCallFuture<SnapshotResult> future = context.future;
         SnapshotResult res = null;
@@ -375,7 +365,6 @@ protected Void revertSnapshotCallback(AsyncCallbackDispatcher<SnapshotServiceImp
             res.setResult(e.toString());
         }
         future.complete(res);
-        return null;
     }
 
     @Override
@@ -523,12 +512,11 @@ private void syncSnapshotToRegionStore(long snapshotId, DataStore store){
         return future;
     }
 
-    protected Void syncSnapshotCallBack(AsyncCallbackDispatcher<SnapshotServiceImpl, CopyCommandResult> callback,
+    protected void syncSnapshotCallBack(AsyncCallbackDispatcher<SnapshotServiceImpl, CopyCommandResult> callback,
             CopySnapshotContext<CommandResult> context) {
         CopyCommandResult result = callback.getResult();
         SnapshotInfo destSnapshot = context.destSnapshot;
         SnapshotResult res = new SnapshotResult(destSnapshot, null);
-
         AsyncCallFuture<SnapshotResult> future = context.future;
         try {
             if (result.isFailed()) {
@@ -544,7 +532,5 @@ protected Void syncSnapshotCallBack(AsyncCallbackDispatcher<SnapshotServiceImpl,
             res.setResult(e.toString());
             future.complete(res);
         }
-
-        return null;
     }
 }
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
index 2caa3ef3f41..b6582823e54 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
@@ -166,16 +166,14 @@ public void createAsync(DataObject data, DataStore store, AsyncCompletionCallbac
         return;
     }
 
-    protected Void createAsynCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CreateCmdResult> callback, CreateContext<CreateCmdResult> context) {
+    protected void createAsynCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CreateCmdResult> callback, CreateContext<CreateCmdResult> context) {
         CreateCmdResult result = callback.getResult();
         DataObject objInStrore = context.objInStrore;
         CreateCmdResult upResult = new CreateCmdResult(null, null);
         if (result.isFailed()) {
             upResult.setResult(result.getResult());
             context.getParentCallback().complete(upResult);
-            return null;
         }
-
         try {
             objectInDataStoreMgr.update(objInStrore, ObjectInDataStoreStateMachine.Event.OperationSuccessed);
         } catch (NoTransitionException e) {
@@ -184,24 +182,18 @@ protected Void createAsynCallback(AsyncCallbackDispatcher<DataObjectManagerImpl,
             } catch (Exception e1) {
                 s_logger.debug("failed to change state", e1);
             }
-
             upResult.setResult(e.toString());
             context.getParentCallback().complete(upResult);
-            return null;
         } catch (ConcurrentOperationException e) {
             try {
                 objectInDataStoreMgr.update(objInStrore, ObjectInDataStoreStateMachine.Event.OperationFailed);
             } catch (Exception e1) {
                 s_logger.debug("failed to change state", e1);
             }
-
             upResult.setResult(e.toString());
             context.getParentCallback().complete(upResult);
-            return null;
         }
-
         context.getParentCallback().complete(result);
-        return null;
     }
 
     class CopyContext<T> extends AsyncRpcContext<T> {
@@ -248,10 +240,9 @@ public void copyAsync(DataObject srcData, DataObject destData, AsyncCompletionCa
         motionSrv.copyAsync(srcData, destData, caller);
     }
 
-    protected Void copyCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CopyCommandResult> callback, CopyContext<CreateCmdResult> context) {
+    protected void copyCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CopyCommandResult> callback, CopyContext<CreateCmdResult> context) {
         CopyCommandResult result = callback.getResult();
         DataObject destObj = context.destObj;
-
         if (result.isFailed()) {
             try {
                 objectInDataStoreMgr.update(destObj, Event.OperationFailed);
@@ -264,7 +255,6 @@ protected Void copyCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CopyC
             res.setResult(result.getResult());
             context.getParentCallback().complete(res);
         }
-
         try {
             objectInDataStoreMgr.update(destObj, ObjectInDataStoreStateMachine.Event.OperationSuccessed);
         } catch (NoTransitionException e) {
@@ -290,7 +280,6 @@ protected Void copyCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CopyC
         }
         CreateCmdResult res = new CreateCmdResult(result.getPath(), null);
         context.getParentCallback().complete(res);
-        return null;
     }
 
     class DeleteContext<T> extends AsyncRpcContext<T> {
@@ -325,9 +314,8 @@ public void deleteAsync(DataObject data, AsyncCompletionCallback<CommandResult>
         return;
     }
 
-    protected Void deleteAsynCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CommandResult> callback, DeleteContext<CommandResult> context) {
+    protected void deleteAsynCallback(AsyncCallbackDispatcher<DataObjectManagerImpl, CommandResult> callback, DeleteContext<CommandResult> context) {
         DataObject destObj = context.obj;
-
         CommandResult res = callback.getResult();
         if (res.isFailed()) {
             try {
@@ -337,7 +325,6 @@ protected Void deleteAsynCallback(AsyncCallbackDispatcher<DataObjectManagerImpl,
             } catch (ConcurrentOperationException e) {
                 s_logger.debug("delete failed", e);
             }
-
         } else {
             try {
                 objectInDataStoreMgr.update(destObj, Event.OperationSuccessed);
@@ -347,9 +334,7 @@ protected Void deleteAsynCallback(AsyncCallbackDispatcher<DataObjectManagerImpl,
                 s_logger.debug("delete failed", e);
             }
         }
-
         context.getParentCallback().complete(res);
-        return null;
     }
 
     @Override
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
index 0068c2d4f7b..5cd2b9f412e 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
@@ -141,7 +141,7 @@ public void createAsync(DataStore dataStore, DataObject data, AsyncCompletionCal
         }
     }
 
-    protected Void createTemplateAsyncCallback(AsyncCallbackDispatcher<? extends BaseImageStoreDriverImpl, DownloadAnswer> callback,
+    protected void createTemplateAsyncCallback(AsyncCallbackDispatcher<? extends BaseImageStoreDriverImpl, DownloadAnswer> callback,
         CreateContext<CreateCmdResult> context) {
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Performing image store createTemplate async callback");
@@ -156,7 +156,6 @@ protected Void createTemplateAsyncCallback(AsyncCallbackDispatcher<? extends Bas
                 if (s_logger.isDebugEnabled()) {
                     s_logger.debug("Template is already in DOWNLOADED state, ignore further incoming DownloadAnswer");
                 }
-                return null;
             }
             TemplateDataStoreVO updateBuilder = _templateStoreDao.createForUpdate();
             updateBuilder.setDownloadPercent(answer.getDownloadPct());
@@ -196,11 +195,9 @@ protected Void createTemplateAsyncCallback(AsyncCallbackDispatcher<? extends Bas
             CreateCmdResult result = new CreateCmdResult(null, null);
             caller.complete(result);
         }
-        return null;
     }
 
-    protected Void
-        createVolumeAsyncCallback(AsyncCallbackDispatcher<? extends BaseImageStoreDriverImpl, DownloadAnswer> callback, CreateContext<CreateCmdResult> context) {
+    protected void createVolumeAsyncCallback(AsyncCallbackDispatcher<? extends BaseImageStoreDriverImpl, DownloadAnswer> callback, CreateContext<CreateCmdResult> context) {
         DownloadAnswer answer = callback.getResult();
         DataObject obj = context.data;
         DataStore store = obj.getDataStore();
@@ -211,7 +208,6 @@ protected Void createTemplateAsyncCallback(AsyncCallbackDispatcher<? extends Bas
                 if (s_logger.isDebugEnabled()) {
                     s_logger.debug("Volume is already in DOWNLOADED state, ignore further incoming DownloadAnswer");
                 }
-                return null;
             }
             VolumeDataStoreVO updateBuilder = _volumeStoreDao.createForUpdate();
             updateBuilder.setDownloadPercent(answer.getDownloadPct());
@@ -246,7 +242,6 @@ protected Void createTemplateAsyncCallback(AsyncCallbackDispatcher<? extends Bas
             CreateCmdResult result = new CreateCmdResult(null, null);
             caller.complete(result);
         }
-        return null;
     }
 
     @Override
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index a2fd656d4b2..29815953bc9 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -216,7 +216,7 @@ public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore)
         return future;
     }
 
-    protected Void createVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> callback, CreateVolumeContext<VolumeApiResult> context) {
+    protected void createVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> callback, CreateVolumeContext<VolumeApiResult> context) {
         CreateCmdResult result = callback.getResult();
         DataObject vo = context.getVolume();
         String errMsg = null;
@@ -231,7 +231,6 @@ protected Void createVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, C
             volResult.setResult(errMsg);
         }
         context.getFuture().complete(volResult);
-        return null;
     }
 
     private class DeleteVolumeContext<T> extends AsyncRpcContext<T> {
@@ -328,7 +327,7 @@ private boolean canVolumeBeRemoved(long volumeId) {
         return future;
     }
 
-    public Void deleteVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CommandResult> callback, DeleteVolumeContext<VolumeApiResult> context) {
+    public void deleteVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CommandResult> callback, DeleteVolumeContext<VolumeApiResult> context) {
         CommandResult result = callback.getResult();
         VolumeObject vo = context.getVolume();
         VolumeApiResult apiResult = new VolumeApiResult(vo);
@@ -347,7 +346,6 @@ public Void deleteVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, Comm
             s_logger.debug("ignore delete volume status update failure, it will be picked up by storage clean up thread later", e);
         }
         context.getFuture().complete(apiResult);
-        return null;
     }
 
     @Override
@@ -520,7 +518,7 @@ protected void createBaseImageAsync(VolumeInfo volume, PrimaryDataStore dataStor
         return;
     }
 
-    protected Void managedCopyBaseImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
+    protected void managedCopyBaseImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
             ManagedCreateBaseImageContext<VolumeApiResult> context) {
         CopyCommandResult result = callback.getResult();
         VolumeInfo volumeInfo = context.getVolumeInfo();
@@ -528,34 +526,25 @@ protected Void managedCopyBaseImageCallback(AsyncCallbackDispatcher<VolumeServic
 
         if (result.isSuccess()) {
             // volumeInfo.processEvent(Event.OperationSuccessed, result.getAnswer());
-
             VolumeVO volume = volDao.findById(volumeInfo.getId());
             CopyCmdAnswer answer = (CopyCmdAnswer)result.getAnswer();
             TemplateObjectTO templateObjectTo = (TemplateObjectTO)answer.getNewData();
-
             volume.setPath(templateObjectTo.getPath());
-
             if (templateObjectTo.getFormat() != null) {
                 volume.setFormat(templateObjectTo.getFormat());
             }
-
             volDao.update(volume.getId(), volume);
         }
         else {
             volumeInfo.processEvent(Event.DestroyRequested);
-
             res.setResult(result.getResult());
         }
-
         AsyncCallFuture<VolumeApiResult> future = context.getFuture();
-
         future.complete(res);
-
-        return null;
     }
 
     @DB
-    protected Void copyBaseImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CreateBaseImageContext<VolumeApiResult> context) {
+    protected void copyBaseImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CreateBaseImageContext<VolumeApiResult> context) {
         CopyCommandResult result = callback.getResult();
         VolumeApiResult res = new VolumeApiResult(context.getVolume());
 
@@ -565,12 +554,10 @@ protected Void copyBaseImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl,
             templateOnPrimaryStoreObj.processEvent(Event.OperationFailed);
             res.setResult(result.getResult());
             future.complete(res);
-            return null;
         }
 
         templateOnPrimaryStoreObj.processEvent(Event.OperationSuccessed, result.getAnswer());
         createVolumeFromBaseImageAsync(context.volume, templateOnPrimaryStoreObj, context.dataStore, future);
-        return null;
     }
 
     private class CreateVolumeFromBaseImageContext<T> extends AsyncRpcContext<T> {
@@ -609,7 +596,7 @@ protected void createVolumeFromBaseImageAsync(VolumeInfo volume, DataObject temp
     }
 
     @DB
-    protected Void createVolumeFromBaseImageCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
+    protected void createVolumeFromBaseImageCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
             CreateVolumeFromBaseImageContext<VolumeApiResult> context) {
         DataObject vo = context.vo;
         DataObject tmplOnPrimary = context.templateOnStore;
@@ -619,7 +606,6 @@ protected Void createVolumeFromBaseImageCallBack(AsyncCallbackDispatcher<VolumeS
         if (result.isSuccess()) {
             vo.processEvent(Event.OperationSuccessed, result.getAnswer());
         } else {
-
             vo.processEvent(Event.OperationFailed);
             volResult.setResult(result.getResult());
             // hack for Vmware: host is down, previously download template to the host needs to be re-downloaded, so we need to reset
@@ -650,7 +636,6 @@ protected Void createVolumeFromBaseImageCallBack(AsyncCallbackDispatcher<VolumeS
 
         AsyncCallFuture<VolumeApiResult> future = context.getFuture();
         future.complete(volResult);
-        return null;
     }
 
     @Override
@@ -791,7 +776,7 @@ public boolean destroyVolume(long volumeId) throws ConcurrentOperationException
         return future;
     }
 
-    protected Void createVolumeFromSnapshotCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
+    protected void createVolumeFromSnapshotCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback,
             CreateVolumeFromBaseImageContext<VolumeApiResult> context) {
         CopyCommandResult result = callback.getResult();
         VolumeInfo volume = (VolumeInfo)context.templateOnStore;
@@ -804,7 +789,6 @@ protected Void createVolumeFromSnapshotCallback(AsyncCallbackDispatcher<VolumeSe
         } else {
             event = Event.OperationSuccessed;
         }
-
         try {
             if (result.isSuccess()) {
                 volume.processEvent(event, result.getAnswer());
@@ -816,10 +800,8 @@ protected Void createVolumeFromSnapshotCallback(AsyncCallbackDispatcher<VolumeSe
             s_logger.debug("create volume from snapshot failed", e);
             apiResult.setResult(e.toString());
         }
-
         AsyncCallFuture<VolumeApiResult> future = context.future;
         future.complete(apiResult);
-        return null;
     }
 
     protected VolumeVO duplicateVolumeOnAnotherStorage(Volume volume, StoragePool pool) {
@@ -886,8 +868,7 @@ public CopyVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFuture<Vo
         }
     }
 
-    protected Void
-    copyVolumeFromImageToPrimaryCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {
+    protected void copyVolumeFromImageToPrimaryCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {
         VolumeInfo srcVolume = context.srcVolume;
         VolumeInfo destVolume = context.destVolume;
         CopyCommandResult result = callback.getResult();
@@ -899,9 +880,7 @@ public CopyVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFuture<Vo
                 srcVolume.processEvent(Event.OperationFailed);
                 res.setResult(result.getResult());
                 future.complete(res);
-                return null;
             }
-
             srcVolume.processEvent(Event.OperationSuccessed);
             destVolume.processEvent(Event.OperationSuccessed, result.getAnswer());
             srcVolume.getDataStore().delete(srcVolume);
@@ -910,7 +889,6 @@ public CopyVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFuture<Vo
             res.setResult(e.toString());
             future.complete(res);
         }
-        return null;
     }
 
     protected AsyncCallFuture<VolumeApiResult> copyVolumeFromPrimaryToImage(VolumeInfo srcVolume, DataStore destStore) {
@@ -940,8 +918,7 @@ public CopyVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFuture<Vo
         }
     }
 
-    protected Void
-    copyVolumeFromPrimaryToImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {
+    protected void copyVolumeFromPrimaryToImageCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {
         VolumeInfo srcVolume = context.srcVolume;
         VolumeInfo destVolume = context.destVolume;
         CopyCommandResult result = callback.getResult();
@@ -962,16 +939,13 @@ public CopyVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFuture<Vo
             res.setResult(e.toString());
             future.complete(res);
         }
-        return null;
     }
 
     @Override
     public AsyncCallFuture<VolumeApiResult> copyVolume(VolumeInfo srcVolume, DataStore destStore) {
-
         if (srcVolume.getState() == Volume.State.Uploaded) {
             return copyVolumeFromImageToPrimary(srcVolume, destStore);
         }
-
         if (destStore.getRole() == DataStoreRole.Image) {
             return copyVolumeFromPrimaryToImage(srcVolume, destStore);
         }
@@ -1004,7 +978,7 @@ public CopyVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFuture<Vo
         return future;
     }
 
-    protected Void copyVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {
+    protected void copyVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyVolumeContext<VolumeApiResult> context) {
         VolumeInfo srcVolume = context.srcVolume;
         VolumeInfo destVolume = context.destVolume;
         CopyCommandResult result = callback.getResult();
@@ -1020,7 +994,6 @@ protected Void copyVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, Cop
                 AsyncCallFuture<VolumeApiResult> destroyFuture = expungeVolumeAsync(destVolume);
                 destroyFuture.get();
                 future.complete(res);
-                return null;
             }
             srcVolume.processEvent(Event.OperationSuccessed);
             destVolume.processEvent(Event.MigrationCopySucceeded, result.getAnswer());
@@ -1045,8 +1018,6 @@ protected Void copyVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, Cop
             res.setResult(e.toString());
             future.complete(res);
         }
-
-        return null;
     }
 
     private class MigrateVolumeContext<T> extends AsyncRpcContext<T> {
@@ -1092,7 +1063,7 @@ public MigrateVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFuture
         return future;
     }
 
-    protected Void migrateVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, MigrateVolumeContext<VolumeApiResult> context) {
+    protected void migrateVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, MigrateVolumeContext<VolumeApiResult> context) {
         VolumeInfo srcVolume = context.srcVolume;
         CopyCommandResult result = callback.getResult();
         AsyncCallFuture<VolumeApiResult> future = context.future;
@@ -1111,8 +1082,6 @@ protected Void migrateVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl,
             res.setResult(e.toString());
             future.complete(res);
         }
-
-        return null;
     }
 
     private class MigrateVmWithVolumesContext<T> extends AsyncRpcContext<T> {
@@ -1168,8 +1137,7 @@ public MigrateVmWithVolumesContext(AsyncCompletionCallback<T> callback, AsyncCal
         return future;
     }
 
-    protected Void
-    migrateVmWithVolumesCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, MigrateVmWithVolumesContext<CommandResult> context) {
+    protected void migrateVmWithVolumesCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, MigrateVmWithVolumesContext<CommandResult> context) {
         Map<VolumeInfo, DataStore> volumeToPool = context.volumeToPool;
         CopyCommandResult result = callback.getResult();
         AsyncCallFuture<CommandResult> future = context.future;
@@ -1194,8 +1162,6 @@ public MigrateVmWithVolumesContext(AsyncCompletionCallback<T> callback, AsyncCal
             res.setResult(e.toString());
             future.complete(res);
         }
-
-        return null;
     }
 
     @Override
@@ -1240,7 +1206,7 @@ public MigrateVmWithVolumesContext(AsyncCompletionCallback<T> callback, AsyncCal
         return new Pair<>(ep,volumeOnStore);
     }
 
-    protected Void registerVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> callback, CreateVolumeContext<VolumeApiResult> context) {
+    protected void registerVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> callback, CreateVolumeContext<VolumeApiResult> context) {
         CreateCmdResult result = callback.getResult();
         VolumeObject vo = (VolumeObject)context.volume;
         try {
@@ -1251,10 +1217,8 @@ protected Void registerVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl,
                 if (vol != null) {
                     volDao.remove(vo.getId());
                 }
-
             } else {
                 vo.processEvent(Event.OperationSuccessed, result.getAnswer());
-
                 if (vo.getSize() != null) {
                     // publish usage events
                     // get physical size from volume_store_ref table
@@ -1286,8 +1250,6 @@ protected Void registerVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl,
             }
             VolumeApiResult res = new VolumeApiResult(vo);
             context.future.complete(res);
-            return null;
-
         } catch (Exception e) {
             s_logger.error("register volume failed: ", e);
             // delete the volume entry from volumes table in case of failure
@@ -1297,7 +1259,6 @@ protected Void registerVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl,
             }
             VolumeApiResult res = new VolumeApiResult(null);
             context.future.complete(res);
-            return null;
         }
     }
 
@@ -1347,11 +1308,10 @@ public void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostI
         }
     }
 
-    protected Void resizeVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> callback, CreateVolumeContext<VolumeApiResult> context) {
+    protected void resizeVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> callback, CreateVolumeContext<VolumeApiResult> context) {
         CreateCmdResult result = callback.getResult();
         AsyncCallFuture<VolumeApiResult> future = context.future;
         VolumeInfo volume = (VolumeInfo)context.volume;
-
         if (result.isFailed()) {
             try {
                 volume.processEvent(Event.OperationFailed);
@@ -1361,9 +1321,7 @@ protected Void resizeVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, C
             VolumeApiResult res = new VolumeApiResult(volume);
             res.setResult(result.getResult());
             future.complete(res);
-            return null;
         }
-
         try {
             volume.processEvent(Event.OperationSuccessed);
         } catch (Exception e) {
@@ -1373,11 +1331,8 @@ protected Void resizeVolumeCallback(AsyncCallbackDispatcher<VolumeServiceImpl, C
             future.complete(res);
             return null;
         }
-
         VolumeApiResult res = new VolumeApiResult(volume);
         future.complete(res);
-
-        return null;
     }
 
     @Override
diff --git a/plugins/hypervisors/vmware/test/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategyTest.java b/plugins/hypervisors/vmware/test/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategyTest.java
index e3cc2f6056f..eeeb191c26e 100644
--- a/plugins/hypervisors/vmware/test/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategyTest.java
+++ b/plugins/hypervisors/vmware/test/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategyTest.java
@@ -226,9 +226,8 @@ public MockContext(AsyncCompletionCallback<T> callback, AsyncCallFuture<CommandR
         }
     }
 
-    protected Void mockCallBack(AsyncCallbackDispatcher<VmwareStorageMotionStrategyTest, CopyCommandResult> callback, MockContext<CommandResult> context) {
+    protected void mockCallBack(AsyncCallbackDispatcher<VmwareStorageMotionStrategyTest, CopyCommandResult> callback, MockContext<CommandResult> context) {
         result = callback.getResult();
-        return null;
     }
 
     @Configuration
diff --git a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
index 0a4cfd6c080..3a8ecf383c2 100644
--- a/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
+++ b/plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java
@@ -20,8 +20,6 @@
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
-
 import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
@@ -38,6 +36,7 @@
 import org.apache.cloudstack.storage.command.CommandResult;
 import org.apache.cloudstack.storage.command.CreateObjectCommand;
 import org.apache.cloudstack.storage.datastore.DataObjectManager;
+import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.to.DataStoreTO;
@@ -111,7 +110,7 @@ public CreateVolumeContext(AsyncCompletionCallback<T> callback, DataObject volum
         }
     }
 
-    public Void createAsyncCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, CreateVolumeContext<CreateCmdResult> context) {
+    public void createAsyncCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, CreateVolumeContext<CreateCmdResult> context) {
         /*
          * CreateCmdResult result = null; CreateObjectAnswer volAnswer =
          * (CreateObjectAnswer) callback.getResult(); if (volAnswer.getResult())
@@ -121,7 +120,6 @@ public Void createAsyncCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDr
          *
          * context.getParentCallback().complete(result);
          */
-        return null;
     }
 
     @Override
@@ -138,14 +136,13 @@ public void deleteAsync(DataStore dataStore, DataObject vo, AsyncCompletionCallb
          */
     }
 
-    public Void deleteCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, AsyncRpcContext<CommandResult> context) {
+    public void deleteCallback(AsyncCallbackDispatcher<SamplePrimaryDataStoreDriverImpl, Answer> callback, AsyncRpcContext<CommandResult> context) {
         CommandResult result = new CommandResult();
         Answer answer = callback.getResult();
         if (!answer.getResult()) {
             result.setResult(answer.getDetails());
         }
         context.getParentCallback().complete(result);
-        return null;
     }
 
     /*
diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
index 13649745ec2..5584711041b 100644
--- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java
+++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java
@@ -309,7 +309,7 @@ public CreateTemplateContext(AsyncCompletionCallback<T> callback, TemplateInfo t
         }
     }
 
-    protected Void createTemplateAsyncCallBack(AsyncCallbackDispatcher<HypervisorTemplateAdapter, TemplateApiResult> callback,
+    protected void createTemplateAsyncCallBack(AsyncCallbackDispatcher<HypervisorTemplateAdapter, TemplateApiResult> callback,
         CreateTemplateContext<TemplateApiResult> context) {
         TemplateApiResult result = callback.getResult();
         TemplateInfo template = context.template;
@@ -352,8 +352,6 @@ protected Void createTemplateAsyncCallBack(AsyncCallbackDispatcher<HypervisorTem
                 _resourceLimitMgr.incrementResourceCount(accountId, ResourceType.secondary_storage, template.getSize());
             }
         }
-
-        return null;
     }
 
     @Override


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services