cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 31 May 2021 10:33:11 +0000 (12:33 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 31 May 2021 10:35:47 +0000 (12:35 +0200)
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java

index 26d6375359fdec9081f98b5521af20390048c713..f8c44256d1ce2e14d5f38e81c6f5ca2bc76e1efa 100644 (file)
@@ -77,7 +77,6 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
 
                    if(statusAdapter.getStatus().matches(IStatus.ERROR)) {
 
-                       IStatus status = statusAdapter.getStatus();
                        Throwable t = statusAdapter.getStatus().getException();
                        // NOTE : the global status handling mechanism in the case of
                        //        runtime exceptions is called twice, once by the application
@@ -88,13 +87,11 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
                        return;
                    }
                        previousT = t;
-                        if (t != null && (t.getCause() != null && t.getCause() instanceof PermissionDeniedException)){
-                           MessagingUtils.informationDialog("Permission denied", MessagingUtils.PERMISSION_DENIED);
-
-                       }
-                        else if (t != null && ( t instanceof NoHttpResponseException || (t.getCause() != null && t.getCause() instanceof CdmAuthenticationException) || (t.getMessage() != null && t.getMessage().contains("status code = 403")))){
+                       if (t != null && (t.getCause() != null && t.getCause() instanceof PermissionDeniedException)){
+                           MessagingUtils.informationDialog("Permission denied", MessagingUtils.PERMISSION_DENIED);
+                   }
+                       else if (t != null && ( t instanceof NoHttpResponseException || (t.getCause() != null && t.getCause() instanceof CdmAuthenticationException) || (t.getMessage() != null && t.getMessage().contains("status code = 403")))){
                     MessagingUtils.informationDialog("Access denied", MessagingUtils.ACCESS_DENIED);
-
                 }else
 
                        // NOTE : Currently we only allow RuntimeExceptions since