# HG changeset patch
# User Bjoern Ricks <bjoern.ricks@intevation.de>
# Date 1341918670 0
# Node ID 927a3bd932d5fdfa42179761ada89bf382c6af81
# Parent  0889ec33249c3505692052a7abe6c4f28b7bd489
Fix String comparision in WAS Response class


flys-client/trunk@4912 c6561f87-3c4e-4783-a992-168aeb5c3f6f

diff -r 0889ec33249c -r 927a3bd932d5 flys-client/src/main/java/de/intevation/flys/client/server/was/Response.java
--- a/flys-client/src/main/java/de/intevation/flys/client/server/was/Response.java	Tue Jul 10 10:51:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/was/Response.java	Tue Jul 10 11:11:10 2012 +0000
@@ -44,7 +44,7 @@
             Document doc = builder.build(in);
             Element root = doc.getRootElement();
 
-            if (root.getName() == "ServiceExceptionReport") {
+            if (root.getName() != null && root.getName().equals("ServiceExceptionReport")) {
                 throw new ServiceException(root.getChildText("ServiceException"));
             }
 
@@ -63,7 +63,7 @@
     }
 
     public Boolean isSuccess() {
-        return this.getStatus() == "samlp:Success";
+        return (this.getStatus() != null && this.getStatus().equals("samlp:Success"));
     }
 
     public String getStatus() {