cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r646520 - /incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
Date Wed, 09 Apr 2008 20:32:42 GMT
Author: bimargulies
Date: Wed Apr  9 13:32:39 2008
New Revision: 646520

URL: http://svn.apache.org/viewvc?rev=646520&view=rev
Log:
possibly fix IBM JVM issue.

Modified:
    incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java

Modified: incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java?rev=646520&r1=646519&r2=646520&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
Wed Apr  9 13:32:39 2008
@@ -299,17 +299,23 @@
         }
         
         if (post) {
+            OutputStream outputStream = null;
             try {
-                OutputStream outputStream = connection.getOutputStream(); // implicitly connects?
+                outputStream = connection.getOutputStream(); // implicitly connects?
                 if (dataToSend != null) {
                     outputStream.write(dataToSend);
                     outputStream.flush();
-                    outputStream.close();
                 }
+                outputStream.close();
             } catch (IOException e) {
                 errorFlag = true;
                 LOG.log(Level.SEVERE, "send output error.", e);
                 throwError("NETWORK_ERR");
+                try {
+                    outputStream.close();
+                } catch (IOException e1) {
+                    //
+                }
             }
         }
         // 6



Mime
View raw message