changeset 2945:927a3bd932d5

Fix String comparision in WAS Response class flys-client/trunk@4912 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Tue, 10 Jul 2012 11:11:10 +0000
parents 0889ec33249c
children 1e01d3046260
files flys-client/src/main/java/de/intevation/flys/client/server/was/Response.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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() {

http://dive4elements.wald.intevation.org