cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r596165 - /incubator/cxf/trunk/rt/javascript/src/test/java/org/apache/cxf/javascript/JsXMLHttpRequest.java
Date Sun, 18 Nov 2007 23:56:56 GMT
Author: bimargulies
Date: Sun Nov 18 15:56:55 2007
New Revision: 596165

URL: http://svn.apache.org/viewvc?rev=596165&view=rev
Log:
Neaten up a bit of code that isn't getting much exercise yet.

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=596165&r1=596164&r2=596165&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
Sun Nov 18 15:56:55 2007
@@ -578,18 +578,26 @@
         return readyState;
     }
 
-    public void jsFunction_open(String method, String url, Boolean async, String user, String
password) {
-        if (async == Context.getUndefinedValue()) {
+    public void jsFunction_open(String method, String url, Object asyncObj, Object user,
Object password) {
+        Boolean async;
+        if (asyncObj == Context.getUndefinedValue()) {
             async = Boolean.TRUE;
+        } else {
+            async = (Boolean)asyncObj;
         }
+        
         if (user == Context.getUndefinedValue()) {
             user = null;
+        } else {
+            user = Context.jsToJava(user, String.class);
         }
         if (password == Context.getUndefinedValue()) {
-            user = null;
+            password = null;
+        } else {
+            password = Context.jsToJava(password, String.class);
         }
         
-        doOpen(method, url, async, user, password);
+        doOpen(method, url, async, (String)user, (String)password);
     }
 
     public void jsFunction_setRequestHeader(String header, String value) {



Mime
View raw message