fix NPE during exception handling
authorKatja Luther <k.luther@bgbm.org>
Thu, 9 Jan 2020 12:08:07 +0000 (13:08 +0100)
committerKatja Luther <k.luther@bgbm.org>
Thu, 9 Jan 2020 12:08:07 +0000 (13:08 +0100)
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java

index 19f848b2fd61fd602b6b8faab800ce70a27380fb..6a6fe8469ae6abf26720dca087a1ad6636fcad07 100644 (file)
@@ -120,7 +120,7 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
                    }
                        previousT = t;
 
-                if (t != null && ( t instanceof NoHttpResponseException || t.getCause() instanceof CdmAuthenticationException || t.getMessage().contains("status code = 403"))){
+                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