You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2018/12/11 05:50:36 UTC

[royale-asjs] branch develop updated: Fix for including null in the parameters for a service call when using CompressedRemoteObject

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 1043816  Fix for including null in the parameters for a service call when using CompressedRemoteObject
1043816 is described below

commit 1043816ab100bb50a3e54704c165f554cf11fe80
Author: greg-dove <gr...@gmail.com>
AuthorDate: Tue Dec 11 18:50:18 2018 +1300

    Fix for including null in the parameters for a service call when using CompressedRemoteObject
---
 .../mx/rpc/remoting/CompressedRemoteObject.as      | 44 ++++++++++++----------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/CompressedRemoteObject.as b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/CompressedRemoteObject.as
index a56fd97..96b46da 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/CompressedRemoteObject.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/rpc/remoting/CompressedRemoteObject.as
@@ -39,13 +39,13 @@ package mx.rpc.remoting
     {
         /**
          * disable the compression if true
-         * 
+         *
          * defaults to false
-         * 
+         *
          * @royalesuppresspublicvarwarning
          */
         public static var disableCompression:Boolean;
-        
+
         [ArrayElementType("String")]
         /**
          * @royalesuppresspublicvarwarning
@@ -113,24 +113,28 @@ package mx.rpc.remoting
                 } else if (parameter is IList && IList(parameter).length > 0) {
                     parameter = parameter[0];
                 }
-                var parameterClassName:String = getQualifiedClassName(parameter).replace("::", ".");
-                var included:Boolean;
-                if (includePackages && includePackages.length > 0) {
-                    //var lastDotIndex:int = parameterClassName.lastIndexOf(".");
-                    //var packageName:String = lastDotIndex != -1 ? parameterClassName.slice(0, lastDotIndex) : "";
-					for each (var includePackage:String in includePackages) {
-						if (parameterClassName.indexOf(includePackage) >= 0) {
-							included = true;
-							break;
-						}
-					}
-                }
-                if (!included && includeClasses && includeClasses.length > 0) {
-                    included = includeClasses.indexOf(parameterClassName) != -1;
-                }
-                if (included && excludeClasses && excludeClasses.length > 0) {
-                    included = excludeClasses.indexOf(parameterClassName) == -1;
+                var parameterClassName:String = getQualifiedClassName(parameter);
+                if (parameterClassName) {
+                    parameterClassName = parameterClassName.replace("::", ".");
+                    var included:Boolean;
+                    if (includePackages && includePackages.length > 0) {
+                        //var lastDotIndex:int = parameterClassName.lastIndexOf(".");
+                        //var packageName:String = lastDotIndex != -1 ? parameterClassName.slice(0, lastDotIndex) : "";
+                        for each (var includePackage:String in includePackages) {
+                            if (parameterClassName.indexOf(includePackage) >= 0) {
+                                included = true;
+                                break;
+                            }
+                        }
+                    }
+                    if (!included && includeClasses && includeClasses.length > 0) {
+                        included = includeClasses.indexOf(parameterClassName) != -1;
+                    }
+                    if (included && excludeClasses && excludeClasses.length > 0) {
+                        included = excludeClasses.indexOf(parameterClassName) == -1;
+                    }
                 }
+
                 // if (included) {
                 //     COMPILE::SWF{
                 //     var byteArray:ByteArray = new ByteArray();