You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2008/07/08 23:53:51 UTC

svn commit: r674992 - /ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java

Author: midon
Date: Tue Jul  8 14:53:51 2008
New Revision: 674992

URL: http://svn.apache.org/viewvc?rev=674992&view=rev
Log:
slight improvement

Modified:
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java

Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java?rev=674992&r1=674991&r2=674992&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/JettyWrapper.java Tue Jul  8 14:53:51 2008
@@ -283,18 +283,18 @@
 
 
         private void doPut(HttpServletRequest request, HttpServletResponse response, String articleId) throws IOException {
-            String faultType = request.getHeader("Fault-Type")!=null?request.getHeader("Fault-Type"):"";
-            if (faultType.startsWith("500_no_body")) {
+            String faultType = request.getHeader("Fault-Type");
+            if ("500_no_body".equals(faultType)) {
                 response.setStatus(500);
-            } else if (faultType.startsWith("500_text_body")) {
+            } else if ("500_text_body".equals(faultType)) {
                 response.setContentType("text");
                 response.getOutputStream().print("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.");
                 response.setStatus(500);
-            } else if (faultType.startsWith("500_unknown_xml_body")) {
+            } else if ("500_unknown_xml_body".equals(faultType)) {
                 response.setContentType("text/xml");
                 response.getOutputStream().print("<book><abstract>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</abstract></book>");
                 response.setStatus(500);
-            } else if (faultType.startsWith("500_expected_xml_body")) {
+            } else if ("500_expected_xml_body".equals(faultType)) {
                 response.setContentType("text/xml");
 
                 Document doc = DOMUtils.newDocument();