cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Fri, 14 May 2021 18:18:06 +0000 (20:18 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Fri, 14 May 2021 18:18:06 +0000 (20:18 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/util/ProgressMonitorClientManager.java

index c5b39ec7eb5627408303f682cc2a602d94788769..8df84fd07191d5cf91110f8f4535eee2b51a74c0 100644 (file)
@@ -29,9 +29,7 @@ import eu.etaxonomy.taxeditor.operation.IPostMoniteredOperationEnabled;
  *
  * @author cmathew
  * @date 23 Oct 2015
- *
  */
-
 public class ProgressMonitorClientManager {
     private static final Logger logger = Logger.getLogger(ProgressMonitorClientManager.class);
 
@@ -58,6 +56,7 @@ public class ProgressMonitorClientManager {
             SubMonitor monitor) throws InterruptedException {
         return pollMonitor(label, uuid, pollInterval, postOp, Arrays.asList(feedbackGenerator), monitor);
     }
+
     /**
      * Polls the progress monitor service for the progress status of a monitor
      * corresponding to the given uuid.
@@ -102,16 +101,14 @@ public class ProgressMonitorClientManager {
                     break;
                 }
             }
-
             if (remotingMonitor == null){
                 return null;
             }
+
             // if the total work is still not been set then we assume that the
             // operation has zero work units
-
             if(remotingMonitor.getTotalWork() == 0 && remotingMonitor.isDone()) {
                 return remotingMonitor;
-
             }else if (remotingMonitor.getTotalWork() == 0 ){
                 Object result = remotingMonitor.getResult();
                 InterruptedException exception = new InterruptedException("Monitor has zero work units");
@@ -146,8 +143,8 @@ public class ProgressMonitorClientManager {
                     }else{
                         throw e;
                     }
-
                 }
+
                 // check if remoting monitor is waiting for feedback
                 if(remotingMonitor.getIsWaitingForFeedback()) {
                     if(feedbackGenerators != null) {
@@ -166,6 +163,7 @@ public class ProgressMonitorClientManager {
                         feedbackCount++;
                     }
                 }
+
                 serverTotalWorkDone = (int) remotingMonitor.getWorkDone();
                 logger.info("Work done from start: " + serverTotalWorkDone);
                 String percentage = "100";