You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/10/06 13:48:06 UTC

[01/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - npm-flexjs: changes line ending of scripts to LF because CRLF does not work on Mac, causing bad interpreter: No such file or directory error

Repository: flex-utilities
Updated Branches:
  refs/heads/feature/flash-downloader c84efdf3a -> 8579cf898


npm-flexjs: changes line ending of scripts to LF because CRLF does not work on Mac, causing bad interpreter: No such file or directory error


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/59664053
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/59664053
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/59664053

Branch: refs/heads/feature/flash-downloader
Commit: 59664053cea8436c2d4a6f0b7df10c619f040826
Parents: e5c3d36
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Aug 17 10:28:19 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Aug 17 10:28:19 2016 -0700

----------------------------------------------------------------------
 .../dependencies/download_dependencies.js       | 29 ++++++++++++++++++++
 npm-flexjs/package.json                         |  1 +
 2 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/59664053/npm-flexjs/dependencies/download_dependencies.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js
index e8fa370..3858049 100644
--- a/npm-flexjs/dependencies/download_dependencies.js
+++ b/npm-flexjs/dependencies/download_dependencies.js
@@ -21,6 +21,7 @@
 
 var fs = require('fs');
 var mkdirp = require('mkdirp');
+var eol = require('eol');
 var constants = require('./Constants');
 var adobeair = require('./AdobeAIR');
 var flashplayerglobal = require('./FlashPlayerGlobal');
@@ -30,6 +31,7 @@ var swfObject = require('./SWFObject');
 var flatUI = require('./FlatUI');
 
 var installSteps = [
+    updateScriptEOL,
     createDownloadsDirectory,
     installFlatUI,
     installFlashPlayerGlobal,
@@ -45,6 +47,33 @@ function start()
     installSteps[0].call();
 }
 
+function updateScriptEOL()
+{
+    try
+    {
+        var files = 
+        [
+            'js/bin/asjscnpm',
+            'js/bin/asjscompcnpm',
+            'js/bin/mxmlcnpm'
+        ];
+        do
+        {
+            var file = files.shift();
+            var data = fs.readFileSync(file, {encoding: 'utf8'});
+            data = eol.lf(data);
+            fs.writeFileSync(file, data, {encoding: 'utf8', mode: 0o755});
+        }
+        while(files.length > 0)
+    }
+    catch(e)
+    {
+        handleAbort();
+        return;
+    }
+    handleInstallStepComplete();
+}
+
 function createDownloadsDirectory()
 {
     //Create downloads directory if it does not exist already

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/59664053/npm-flexjs/package.json
----------------------------------------------------------------------
diff --git a/npm-flexjs/package.json b/npm-flexjs/package.json
index 6181aea..0fd08b3 100644
--- a/npm-flexjs/package.json
+++ b/npm-flexjs/package.json
@@ -16,6 +16,7 @@
   "author": "OmPrakash Muppirala <bi...@apache.org>",
   "license": "Apache-2.0",
   "dependencies": {
+    "eol": "^0.2.0",
     "fs-extra": "^0.26.3",
     "merge-dirs": "^0.2.1",
     "mkdirp": "^0.5.1",


[05/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - npm-flexjs: added missing cygpath call for SCRIPT_HOME (references #8)

Posted by cd...@apache.org.
npm-flexjs: added missing cygpath call for SCRIPT_HOME (references #8)


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/3b52244c
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/3b52244c
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/3b52244c

Branch: refs/heads/feature/flash-downloader
Commit: 3b52244cbd5999cdf7697beb03def751883489df
Parents: 96f4e39
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Aug 17 16:13:59 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Aug 17 16:13:59 2016 -0700

----------------------------------------------------------------------
 npm-flexjs/js/bin/asjscnpm     | 1 +
 npm-flexjs/js/bin/asjscompcnpm | 1 +
 npm-flexjs/js/bin/mxmlcnpm     | 1 +
 3 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3b52244c/npm-flexjs/js/bin/asjscnpm
----------------------------------------------------------------------
diff --git a/npm-flexjs/js/bin/asjscnpm b/npm-flexjs/js/bin/asjscnpm
index 1b4ffc2..8a5f4cf 100755
--- a/npm-flexjs/js/bin/asjscnpm
+++ b/npm-flexjs/js/bin/asjscnpm
@@ -50,6 +50,7 @@ D32=''
 
 if [ $OS = "Windows" ]; then
 
+	SCRIPT_HOME=`cygpath -m $SCRIPT_HOME`
 	FALCON_HOME=`cygpath -m $FALCON_HOME`
 	FLEX_HOME=`cygpath -m $FLEX_HOME`
 

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3b52244c/npm-flexjs/js/bin/asjscompcnpm
----------------------------------------------------------------------
diff --git a/npm-flexjs/js/bin/asjscompcnpm b/npm-flexjs/js/bin/asjscompcnpm
index 4e4d322..12177d2 100755
--- a/npm-flexjs/js/bin/asjscompcnpm
+++ b/npm-flexjs/js/bin/asjscompcnpm
@@ -50,6 +50,7 @@ D32=''
 
 if [ $OS = "Windows" ]; then
 
+	SCRIPT_HOME=`cygpath -m $SCRIPT_HOME`
 	FALCON_HOME=`cygpath -m $FALCON_HOME`
 	FLEX_HOME=`cygpath -m $FLEX_HOME`
 

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3b52244c/npm-flexjs/js/bin/mxmlcnpm
----------------------------------------------------------------------
diff --git a/npm-flexjs/js/bin/mxmlcnpm b/npm-flexjs/js/bin/mxmlcnpm
index f344768..0f29d98 100755
--- a/npm-flexjs/js/bin/mxmlcnpm
+++ b/npm-flexjs/js/bin/mxmlcnpm
@@ -60,6 +60,7 @@ D32=''
 
 if [ $OS = "Windows" ]; then
 
+    SCRIPT_HOME=`cygpath -m $SCRIPT_HOME`
 	FALCON_HOME=`cygpath -m $FALCON_HOME`
 	FLEX_HOME=`cygpath -m $FLEX_HOME`
 


[04/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - npm-flexjs: shell scripts detect sdk location by detecting if they were run as symlinks, if required (references #8)

Posted by cd...@apache.org.
npm-flexjs: shell scripts detect sdk location by detecting if they were run as symlinks, if required (references #8)


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/96f4e398
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/96f4e398
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/96f4e398

Branch: refs/heads/feature/flash-downloader
Commit: 96f4e398a8895500f33bb197858222f47c951f7e
Parents: 1cd590f
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Aug 17 15:39:31 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Aug 17 15:40:27 2016 -0700

----------------------------------------------------------------------
 npm-flexjs/js/bin/asjscnpm     | 14 ++++++++++----
 npm-flexjs/js/bin/asjscompcnpm | 14 ++++++++++----
 npm-flexjs/js/bin/mxmlcnpm     | 14 ++++++++++----
 3 files changed, 30 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/96f4e398/npm-flexjs/js/bin/asjscnpm
----------------------------------------------------------------------
diff --git a/npm-flexjs/js/bin/asjscnpm b/npm-flexjs/js/bin/asjscnpm
index cc7570f..1b4ffc2 100755
--- a/npm-flexjs/js/bin/asjscnpm
+++ b/npm-flexjs/js/bin/asjscnpm
@@ -25,10 +25,16 @@
 # In Windows Command Prompt, use mxmlc.bat instead.
 #
 
-function abspath() { pushd . > /dev/null; if [ -d "$1" ]; then cd "$1"; dirs -l +0; else cd "`dirname \"$1\"`"; cur_dir=`dirs -l +0`; if [ "$cur_dir" == "/" ]; then echo "$cur_dir`basename \"$1\"`"; else echo "$cur_dir/`basename \"$1\"`"; fi; fi; popd > /dev/null; }
-SCRIPT_REAL_FILE=`readlink "$0" || echo "$0"`;
-SCRIPT_ABS_PATH=`abspath "$SCRIPT_REAL_FILE"`
-SCRIPT_HOME=`dirname "$SCRIPT_ABS_PATH"`
+SCRIPT_HOME="$0"
+# try to find the real script if $0 is a symlink
+pushd . > /dev/null
+if [ -h "$SCRIPT_HOME" ]; then
+	cd "`dirname "$SCRIPT_HOME"`"
+	SCRIPT_HOME="`readlink "\`basename $SCRIPT_HOME\`"`"
+fi
+cd "`dirname "${SCRIPT_HOME}"`"
+SCRIPT_HOME="`pwd`"
+popd > /dev/null
 FALCON_HOME=${SCRIPT_HOME}/../..
 FLEX_HOME=${SCRIPT_HOME}/../..
 

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/96f4e398/npm-flexjs/js/bin/asjscompcnpm
----------------------------------------------------------------------
diff --git a/npm-flexjs/js/bin/asjscompcnpm b/npm-flexjs/js/bin/asjscompcnpm
index 0435aac..4e4d322 100755
--- a/npm-flexjs/js/bin/asjscompcnpm
+++ b/npm-flexjs/js/bin/asjscompcnpm
@@ -25,10 +25,16 @@
 # In Windows Command Prompt, use mxmlc.bat instead.
 #
 
-function abspath() { pushd . > /dev/null; if [ -d "$1" ]; then cd "$1"; dirs -l +0; else cd "`dirname \"$1\"`"; cur_dir=`dirs -l +0`; if [ "$cur_dir" == "/" ]; then echo "$cur_dir`basename \"$1\"`"; else echo "$cur_dir/`basename \"$1\"`"; fi; fi; popd > /dev/null; }
-SCRIPT_REAL_FILE=`readlink "$0" || echo "$0"`;
-SCRIPT_ABS_PATH=`abspath "$SCRIPT_REAL_FILE"`
-SCRIPT_HOME=`dirname "$SCRIPT_ABS_PATH"`
+SCRIPT_HOME="$0"
+# try to find the real script if $0 is a symlink
+pushd . > /dev/null
+if [ -h "$SCRIPT_HOME" ]; then
+	cd "`dirname "$SCRIPT_HOME"`"
+	SCRIPT_HOME="`readlink "\`basename $SCRIPT_HOME\`"`"
+fi
+cd "`dirname "${SCRIPT_HOME}"`"
+SCRIPT_HOME="`pwd`"
+popd > /dev/null
 FALCON_HOME=${SCRIPT_HOME}/../..
 FLEX_HOME=${SCRIPT_HOME}/../..
 

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/96f4e398/npm-flexjs/js/bin/mxmlcnpm
----------------------------------------------------------------------
diff --git a/npm-flexjs/js/bin/mxmlcnpm b/npm-flexjs/js/bin/mxmlcnpm
index 1546763..f344768 100755
--- a/npm-flexjs/js/bin/mxmlcnpm
+++ b/npm-flexjs/js/bin/mxmlcnpm
@@ -25,10 +25,16 @@
 # In Windows Command Prompt, use mxmlc.bat instead.
 #
 
-function abspath() { pushd . > /dev/null; if [ -d "$1" ]; then cd "$1"; dirs -l +0; else cd "`dirname \"$1\"`"; cur_dir=`dirs -l +0`; if [ "$cur_dir" == "/" ]; then echo "$cur_dir`basename \"$1\"`"; else echo "$cur_dir/`basename \"$1\"`"; fi; fi; popd > /dev/null; }
-SCRIPT_REAL_FILE=`readlink "$0" || echo "$0"`;
-SCRIPT_ABS_PATH=`abspath "$SCRIPT_REAL_FILE"`
-SCRIPT_HOME=`dirname "$SCRIPT_ABS_PATH"`
+SCRIPT_HOME="$0"
+# try to find the real script if $0 is a symlink
+pushd . > /dev/null
+if [ -h "$SCRIPT_HOME" ]; then
+    cd "`dirname "$SCRIPT_HOME"`"
+    SCRIPT_HOME="`readlink "\`basename $SCRIPT_HOME\`"`"
+fi
+cd "`dirname "${SCRIPT_HOME}"`"
+SCRIPT_HOME="`pwd`"
+popd > /dev/null
 if [ "x${FALCON_HOME}" = "x" ]
 then
     FALCON_HOME=${SCRIPT_HOME}/../..


[03/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - npm-flexjs: batch files get CRLF and other files get LF in js/bin

Posted by cd...@apache.org.
npm-flexjs: batch files get CRLF and other files get LF in js/bin


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/1cd590f2
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/1cd590f2
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/1cd590f2

Branch: refs/heads/feature/flash-downloader
Commit: 1cd590f2d5f136af27dc8f778af9d11f75d1df5c
Parents: 1bd9060
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Aug 17 14:21:52 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Aug 17 14:21:52 2016 -0700

----------------------------------------------------------------------
 npm-flexjs/dependencies/download_dependencies.js | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/1cd590f2/npm-flexjs/dependencies/download_dependencies.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js
index 851e041..d71996d 100644
--- a/npm-flexjs/dependencies/download_dependencies.js
+++ b/npm-flexjs/dependencies/download_dependencies.js
@@ -57,14 +57,18 @@ function updateScriptEOL()
         do
         {
             var filePath = files.shift();
-            if(path.extname(filePath) !== '')
-            {
-                //skip windows batch files
-                continue;
-            }
             filePath = path.resolve(dirPath, filePath);
             var data = fs.readFileSync(filePath, {encoding: 'utf8'});
-            data = eol.lf(data);
+            if(path.extname(filePath) === '.bat')
+            {
+                //windows scripts
+                data = eol.crlf(data);
+            }
+            else
+            {
+                //mac, linux, or cygwin scripts
+                data = eol.lf(data);
+            }
             fs.writeFileSync(filePath, data, {encoding: 'utf8', mode: 0o755});
         }
         while(files.length > 0)


[07/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - update npm scripts in preparation for 0.7.0 binary package layout changes. The ApacheFalcon and ApacheFlexJS scripts are currently wired to the nightly builds and will need to

Posted by cd...@apache.org.
update npm scripts in preparation for 0.7.0 binary package layout changes.  The ApacheFalcon and ApacheFlexJS scripts are currently wired to the nightly builds and will need to be flipped back to the release after the mirror propagation is complete


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/3bcfdf1b
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/3bcfdf1b
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/3bcfdf1b

Branch: refs/heads/feature/flash-downloader
Commit: 3bcfdf1bb99aeb6a1bde634bcea7eda3cbfb481e
Parents: fa67647
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 30 12:43:08 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 30 12:43:08 2016 -0700

----------------------------------------------------------------------
 npm-flexjs/dependencies/ApacheFalcon.js         | 44 +++++++++++++-------
 npm-flexjs/dependencies/ApacheFlexJS.js         | 11 ++++-
 .../dependencies/download_dependencies.js       |  2 +-
 npm-flexjs/package.json                         | 10 ++---
 4 files changed, 44 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3bcfdf1b/npm-flexjs/dependencies/ApacheFalcon.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/ApacheFalcon.js b/npm-flexjs/dependencies/ApacheFalcon.js
index d0edfa2..d9e5c86 100644
--- a/npm-flexjs/dependencies/ApacheFalcon.js
+++ b/npm-flexjs/dependencies/ApacheFalcon.js
@@ -39,6 +39,7 @@ var playerVersion = pjson.org_apache_flex.player_version;
 var swfVersion = pjson.org_apache_flex.swf_version;
 
 var falconCompilerLibFolder = 'falcon/compiler/lib/';
+var falconLibExternalFolder = 'lib/external/';
 var jsLibFolder = constants.FLEXJS_FOLDER + 'js/lib/';
 var googleClosureCompilerFolder =  constants.FLEXJS_FOLDER + 'js/lib/google/closure-compiler/';
 
@@ -54,7 +55,7 @@ var falconDependencies = [
     {
         url:'http://search.maven.org/remotecontent?filepath=org/antlr/antlr-complete/3.5.2/',
         remoteFileName:'antlr-complete-3.5.2.jar',
-        destinationPath:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder,
+        destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
         destinationFileName:'antlr.jar',
         unzip:false
     },
@@ -64,7 +65,7 @@ var falconDependencies = [
         destinationPath:constants.DOWNLOADS_FOLDER,
         destinationFileName:'',
         pathOfFileToBeCopiedFrom:'commons-cli-1.2/commons-cli-1.2.jar',
-        pathOfFileToBeCopiedTo:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder + 'commons-cli.jar',
+        pathOfFileToBeCopiedTo:constants.FLEXJS_FOLDER + falconLibExternalFolder + 'commons-cli.jar',
         unzip:true
     },
     {
@@ -73,20 +74,20 @@ var falconDependencies = [
         destinationPath:constants.DOWNLOADS_FOLDER,
         destinationFileName:'',
         pathOfFileToBeCopiedFrom:'commons-io-2.4/commons-io-2.4.jar',
-        pathOfFileToBeCopiedTo:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder + 'commons-io.jar',
+        pathOfFileToBeCopiedTo:constants.FLEXJS_FOLDER + falconLibExternalFolder + 'commons-io.jar',
         unzip:true
     },
     {
         url:'http://search.maven.org/remotecontent?filepath=/com/google/guava/guava/17.0/',
         remoteFileName:'guava-17.0.jar',
-        destinationPath:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder,
+        destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
         destinationFileName:'guava.jar',
         unzip:false
     },
     {
-        url:'http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/ws/compiler/lib/',
-        remoteFileName:'jburg.jar',
-        destinationPath:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder,
+        url:'http://search.maven.org/remotecontent?filepath=/net/sourceforge/jburg/jburg/1.10.2',
+        remoteFileName:'jburg-1.10.2.jar',
+        destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
         destinationFileName:'jburg.jar',
         unzip:false
     },
@@ -96,7 +97,7 @@ var falconDependencies = [
         destinationPath:constants.DOWNLOADS_FOLDER,
         destinationFileName:'',
         pathOfFileToBeCopiedFrom:'jflex-1.6.0/lib/jflex-1.6.0.jar',
-        pathOfFileToBeCopiedTo:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder + 'jflex.jar',
+        pathOfFileToBeCopiedTo:constants.FLEXJS_FOLDER + falconLibExternalFolder + 'jflex.jar',
         unzip:true
     },
     {
@@ -105,13 +106,13 @@ var falconDependencies = [
         destinationPath:constants.DOWNLOADS_FOLDER + 'lzma/',
         destinationFileName:'lzma-9.20.jar.zip',
         pathOfFileToBeCopiedFrom:'lzma-9.20.jar',
-        pathOfFileToBeCopiedTo:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder + 'lzma-sdk.jar',
+        pathOfFileToBeCopiedTo:constants.FLEXJS_FOLDER + falconLibExternalFolder + 'lzma-sdk.jar',
         unzip:true
     },
     {
         url:'http://search.maven.org/remotecontent?filepath=org/apache/flex/flex-tool-api/1.0.0/',
         remoteFileName:'flex-tool-api-1.0.0.jar',
-        destinationPath:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder,
+        destinationPath:constants.FLEXJS_FOLDER + falconLibExternalFolder,
         destinationFileName:'flex-tool-api.jar',
         unzip:false
     },
@@ -242,7 +243,7 @@ ApacheFalcon.prepareForFalconDependencies = function()
 
     try
     {
-        mkdirp(constants.FLEXJS_FOLDER + 'externs');
+        mkdirp(constants.FLEXJS_FOLDER + 'flex-typedefs');
     }
     catch(e)
     {
@@ -312,7 +313,7 @@ ApacheFalcon.copyFiles = function()
     var mergedirs = require('merge-dirs');
 
     //Bin
-    mergedirs.default(constants.DOWNLOADS_FOLDER + 'falcon/compiler/generated/dist/sdk/bin',
+    mergedirs.default(constants.DOWNLOADS_FOLDER + 'falcon/compiler/src/assembly/scripts',
         constants.FLEXJS_FOLDER + 'bin',
         'overwrite');
 
@@ -324,17 +325,19 @@ ApacheFalcon.copyFiles = function()
         constants.FLEXJS_FOLDER + 'js/libs',
         'overwrite');
 
-    mergedirs.default(constants.DOWNLOADS_FOLDER + 'falcon/externs',
-        constants.FLEXJS_FOLDER + 'externs',
+    mergedirs.default(constants.DOWNLOADS_FOLDER + 'falcon/flex-typedefs',
+        constants.FLEXJS_FOLDER + 'flex-typedefs',
         'overwrite');
 
-    mergedirs.default(constants.DOWNLOADS_FOLDER + 'falcon/compiler/generated/dist/sdk/lib',
+    mergedirs.default(constants.DOWNLOADS_FOLDER + 'falcon/compiler/lib',
         constants.FLEXJS_FOLDER + 'lib',
         'overwrite');
 
+    /*
     mergedirs.default(constants.DOWNLOADS_FOLDER + 'falcon/compiler/lib',
         constants.FLEXJS_FOLDER + 'lib/external',
         'overwrite');
+	*/
 
 /*    fs.createReadStream(constants.DOWNLOADS_FOLDER + 'falcon/compiler/generated/dist/sdk/lib/' + 'falcon-mxmlc.jar')
         .pipe(fs.createWriteStream(jsLibFolder + 'mxmlc.jar'));
@@ -416,5 +419,14 @@ ApacheFalcon.falconInstallComplete = function()
 
 ApacheFalcon.install = function()
 {
-    request(constants.APACHE_MIRROR_RESOLVER_URL + pathToFalconBinary + fileNameFalconBinary + '?' + constants.REQUEST_JSON_PARAM, ApacheFalcon.handleFalconMirrorsResponse);
+    //request(constants.APACHE_MIRROR_RESOLVER_URL + pathToFalconBinary + fileNameFalconBinary + '?' + constants.REQUEST_JSON_PARAM, ApacheFalcon.handleFalconMirrorsResponse);
+    console.log('Downloading Apache Flex Falcon Compiler');
+	request
+		.get("http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out/apache-flex-falconjx-0.7.0-bin.zip")
+		.pipe(fs.createWriteStream(constants.DOWNLOADS_FOLDER + fileNameFalconBinary)
+			.on('finish', function(){
+				console.log('Apache Flex Falcon Compiler download complete');
+				ApacheFalcon.extract();
+			})
+	);
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3bcfdf1b/npm-flexjs/dependencies/ApacheFlexJS.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/ApacheFlexJS.js b/npm-flexjs/dependencies/ApacheFlexJS.js
index deee801..bb28cfa 100644
--- a/npm-flexjs/dependencies/ApacheFlexJS.js
+++ b/npm-flexjs/dependencies/ApacheFlexJS.js
@@ -64,5 +64,14 @@ ApacheFlexJS.extract = function()
 
 ApacheFlexJS.install = function()
 {
-    request(constants.APACHE_MIRROR_RESOLVER_URL + pathToFlexJSBinary + fileNameFlexJSBinary + '?' + constants.REQUEST_JSON_PARAM, ApacheFlexJS.handleFlexJSMirrorsResponse);
+    //request(constants.APACHE_MIRROR_RESOLVER_URL + pathToFlexJSBinary + fileNameFlexJSBinary + '?' + constants.REQUEST_JSON_PARAM, ApacheFlexJS.handleFlexJSMirrorsResponse);
+    console.log('Downloading Apache FlexJS');
+	request
+		.get("http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/lastSuccessfulBuild/artifact/out/apache-flex-flexjs-0.7.0-bin.zip")
+		.pipe(fs.createWriteStream(constants.DOWNLOADS_FOLDER + fileNameFlexJSBinary)
+			.on('close', function(){
+				console.log('Apache FlexJS download complete');
+				ApacheFlexJS.extract();
+			})
+	);
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3bcfdf1b/npm-flexjs/dependencies/download_dependencies.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js
index d71996d..6aadc2d 100644
--- a/npm-flexjs/dependencies/download_dependencies.js
+++ b/npm-flexjs/dependencies/download_dependencies.js
@@ -69,7 +69,7 @@ function updateScriptEOL()
                 //mac, linux, or cygwin scripts
                 data = eol.lf(data);
             }
-            fs.writeFileSync(filePath, data, {encoding: 'utf8', mode: 0o755});
+            fs.writeFileSync(filePath, data, {encoding: 'utf8', mode: 0x755});
         }
         while(files.length > 0)
     }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3bcfdf1b/npm-flexjs/package.json
----------------------------------------------------------------------
diff --git a/npm-flexjs/package.json b/npm-flexjs/package.json
index 0fd08b3..85d7677 100644
--- a/npm-flexjs/package.json
+++ b/npm-flexjs/package.json
@@ -1,6 +1,6 @@
 {
   "name": "flexjs",
-  "version": "0.6.0",
+  "version": "0.7.0",
   "description": "Apache FlexJS",
   "keywords": [
     "flex",
@@ -35,10 +35,10 @@
     "mxmlc": "./js/bin/mxmlcnpm"
   },
   "org_apache_flex": {
-    "flexjs_path_binary": "flex/flexjs/0.6.0/binaries/",
-    "flexjs_file_name": "apache-flex-flexjs-0.6.0-bin.zip",
-    "falcon_path_binary": "flex/falcon/0.6.0/binaries/",
-    "falcon_file_name": "apache-flex-falconjx-0.6.0-bin.zip",
+    "flexjs_path_binary": "flex/flexjs/0.7.0/binaries/",
+    "flexjs_file_name": "apache-flex-flexjs-0.7.0-bin.zip",
+    "falcon_path_binary": "flex/falcon/0.7.0/binaries/",
+    "falcon_file_name": "apache-flex-falconjx-0.7.0-bin.zip",
     "flash_player_global_url": "http://download.macromedia.com/get/flashplayer/updaters/21/",
     "flash_player_global_file_name": "playerglobal21_0.swc",
     "adobe_air_url": "http://airdownload.adobe.com/air/win/download/21.0/",


[08/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - Merge branches 'develop' and 'feature/flash-downloader' of https://git-wip-us.apache.org/repos/asf/flex-utilities into feature/flash-downloader

Posted by cd...@apache.org.
Merge branches 'develop' and 'feature/flash-downloader' of https://git-wip-us.apache.org/repos/asf/flex-utilities into feature/flash-downloader


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/469dcf94
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/469dcf94
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/469dcf94

Branch: refs/heads/feature/flash-downloader
Commit: 469dcf94be295f1a043908fae0c4d778a87d0fef
Parents: c84efdf 3bcfdf1
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Sep 1 21:58:24 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Sep 1 21:58:24 2016 +0200

----------------------------------------------------------------------
 npm-flexjs/README.md                            |  6 ++-
 npm-flexjs/dependencies/ApacheFalcon.js         | 44 +++++++++++++-------
 npm-flexjs/dependencies/ApacheFlexJS.js         | 11 ++++-
 .../dependencies/download_dependencies.js       | 36 ++++++++++++++++
 npm-flexjs/js/bin/asjscnpm                      | 15 +++++--
 npm-flexjs/js/bin/asjscompcnpm                  | 15 +++++--
 npm-flexjs/js/bin/mxmlcnpm                      | 15 +++++--
 npm-flexjs/package.json                         | 11 ++---
 8 files changed, 117 insertions(+), 36 deletions(-)
----------------------------------------------------------------------



[02/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - npm-flexjs: fixes line endings on all files in js/bin that don't have an extension

Posted by cd...@apache.org.
npm-flexjs: fixes line endings on all files in js/bin that don't have an extension


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/1bd90607
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/1bd90607
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/1bd90607

Branch: refs/heads/feature/flash-downloader
Commit: 1bd90607272908b8364e20a99524485a9bde3e2a
Parents: 5966405
Author: Josh Tynjala <jo...@apache.org>
Authored: Wed Aug 17 12:54:22 2016 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Wed Aug 17 12:54:22 2016 -0700

----------------------------------------------------------------------
 .../dependencies/download_dependencies.js       | 21 +++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/1bd90607/npm-flexjs/dependencies/download_dependencies.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/download_dependencies.js b/npm-flexjs/dependencies/download_dependencies.js
index 3858049..851e041 100644
--- a/npm-flexjs/dependencies/download_dependencies.js
+++ b/npm-flexjs/dependencies/download_dependencies.js
@@ -20,6 +20,7 @@
 'use strict';
 
 var fs = require('fs');
+var path = require('path');
 var mkdirp = require('mkdirp');
 var eol = require('eol');
 var constants = require('./Constants');
@@ -51,18 +52,20 @@ function updateScriptEOL()
 {
     try
     {
-        var files = 
-        [
-            'js/bin/asjscnpm',
-            'js/bin/asjscompcnpm',
-            'js/bin/mxmlcnpm'
-        ];
+        var dirPath = path.join('js', 'bin');
+        var files = fs.readdirSync(dirPath);
         do
         {
-            var file = files.shift();
-            var data = fs.readFileSync(file, {encoding: 'utf8'});
+            var filePath = files.shift();
+            if(path.extname(filePath) !== '')
+            {
+                //skip windows batch files
+                continue;
+            }
+            filePath = path.resolve(dirPath, filePath);
+            var data = fs.readFileSync(filePath, {encoding: 'utf8'});
             data = eol.lf(data);
-            fs.writeFileSync(file, data, {encoding: 'utf8', mode: 0o755});
+            fs.writeFileSync(filePath, data, {encoding: 'utf8', mode: 0o755});
         }
         while(files.length > 0)
     }


[06/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - update README

Posted by cd...@apache.org.
update README


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/fa676474
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/fa676474
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/fa676474

Branch: refs/heads/feature/flash-downloader
Commit: fa6764741cae0efb12c52a805fe02b2ab009a8b5
Parents: 3b52244
Author: Alex Harui <ah...@apache.org>
Authored: Tue Aug 30 12:41:06 2016 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Aug 30 12:41:06 2016 -0700

----------------------------------------------------------------------
 npm-flexjs/README.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/fa676474/npm-flexjs/README.md
----------------------------------------------------------------------
diff --git a/npm-flexjs/README.md b/npm-flexjs/README.md
index bac0c2c..a0ed2da 100644
--- a/npm-flexjs/README.md
+++ b/npm-flexjs/README.md
@@ -47,14 +47,16 @@ Examples
 	HTML5/JavaScript output)
 	
 	Windows: mxmlc C:\Users\<username>\AppData\Roaming\npm\node_modules\flexjs\examples\flexjs\ChartExample\src\ChartExample.mxml
-	Mac: asjsc /usr/local/lib/node_modules/flexjs/examples/flexjs/ChartExample/src/ChartExample.mxml
+	Mac: mxmlc /usr/local/lib/node_modules/flexjs/examples/flexjs/ChartExample/src/ChartExample.mxml
 	
 	ASJSC (Write ActionScript3 targeting HTML5/SVG DOM without requiring JavaScript):
 	
 	Windows: asjsc C:\Users\<username>\AppData\Roaming\npm\node_modules\flexjs\examples\native\USStatesMap\src\USStatesMap.as
 	Mac: asjsc /usr/local/lib/node_modules/flexjs/examples/native/USStatesMap/src/USStatesMap.as
 	
-	
+    You may need to copy the examples to a writeable folder because the compilation
+    will generate an output folder in the example folders.
+
 Note
 =================================
     


[10/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - - Removed some unused imports

Posted by cd...@apache.org.
- Removed some unused imports


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/8579cf89
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/8579cf89
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/8579cf89

Branch: refs/heads/feature/flash-downloader
Commit: 8579cf8984129d88c0474d73be8d0fc38c48a73f
Parents: 3aaaed9
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Oct 6 15:46:42 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Oct 6 15:46:42 2016 +0200

----------------------------------------------------------------------
 .../org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/8579cf89/flex-maven-tools/flex-maven-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-maven-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java b/flex-maven-tools/flex-maven-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java
index 8a72a12..5c8c16c 100644
--- a/flex-maven-tools/flex-maven-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java
+++ b/flex-maven-tools/flex-maven-plugin/plugins/maven-flex-plugin/src/main/java/org/apache/flex/maven/plugins/flex/compiler/CompilerMojo.java
@@ -18,7 +18,6 @@ package org.apache.flex.maven.plugins.flex.compiler;
 
 import org.apache.flex.maven.plugins.flex.AbstractFlexMojo;
 import org.apache.maven.plugin.MojoExecution;
-import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.plugins.annotations.*;
 import org.apache.maven.project.MavenProject;
 


[09/10] git commit: [flex-utilities] [refs/heads/feature/flash-downloader] - - Added some more checks to the code

Posted by cd...@apache.org.
- Added some more checks to the code


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/3aaaed9d
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/3aaaed9d
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/3aaaed9d

Branch: refs/heads/feature/flash-downloader
Commit: 3aaaed9d5d5c45edcbebae8a41119448cefa8f1d
Parents: 469dcf9
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Thu Oct 6 15:45:53 2016 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Thu Oct 6 15:45:53 2016 +0200

----------------------------------------------------------------------
 .../download/utils/utils/ApplePartitionMap.java | 18 ++++++++++++---
 .../utils/utils/DmgBlockChunkEntry.java         |  1 -
 .../utils/utils/DmgPropertyListMishBlock.java   | 12 ++++++++--
 .../download/utils/utils/DmgTrailer.java        | 24 ++++++++++++++++----
 4 files changed, 45 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3aaaed9d/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/ApplePartitionMap.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/ApplePartitionMap.java b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/ApplePartitionMap.java
index e8889fb..c7b145d 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/ApplePartitionMap.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/ApplePartitionMap.java
@@ -51,10 +51,18 @@ public class ApplePartitionMap {
             startingSectorOfPartition = dis.readInt();
             sizeOfPartitionInSectors = dis.readInt();
             byte[] buffer = new byte[32];
-            dis.read(buffer);
+            int readBytes = dis.read(buffer);
+            if(readBytes != 32) {
+                throw new IllegalArgumentException(
+                        "Invalid ApplePartitionMap data. Expected to read 32 bytes for 'nameOfPartition'");
+            }
             nameOfPartition = DmgExtractor.getStringFromZeroTerminatedByteArray(buffer);
             buffer = new byte[32];
-            dis.read(buffer);
+            readBytes = dis.read(buffer);
+            if(readBytes != 32) {
+                throw new IllegalArgumentException(
+                        "Invalid ApplePartitionMap data. Expected to read 32 bytes for 'typeOfPartition'");
+            }
             typeOfPartition = DmgExtractor.getStringFromZeroTerminatedByteArray(buffer);
             startingSectorOfDataAreaInPartition = dis.readInt();
             sizeOfDataAreaInPartitionInSectors = dis.readInt();
@@ -67,7 +75,11 @@ public class ApplePartitionMap {
             dis.skipBytes(4);
             bootCodeChecksum = dis.readInt();
             buffer = new byte[16];
-            dis.read(buffer);
+            readBytes = dis.read(buffer);
+            if(readBytes != 16) {
+                throw new IllegalArgumentException(
+                        "Invalid ApplePartitionMap data. Expected to read 16 bytes for 'processorType'");
+            }
             processorType = DmgExtractor.getStringFromZeroTerminatedByteArray(buffer);
             dis.skipBytes(376);
         } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3aaaed9d/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlockChunkEntry.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlockChunkEntry.java b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlockChunkEntry.java
index ede1b6d..1c13823 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlockChunkEntry.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgBlockChunkEntry.java
@@ -3,7 +3,6 @@ package org.apache.flex.utilities.converter.retrievers.download.utils.utils;
 import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
 import java.io.IOException;
-import java.util.ArrayList;
 
 /**
  * Created by christoferdutz on 25.02.16.

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3aaaed9d/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgPropertyListMishBlock.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgPropertyListMishBlock.java b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgPropertyListMishBlock.java
index a5b4e02..85f9451 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgPropertyListMishBlock.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgPropertyListMishBlock.java
@@ -41,14 +41,22 @@ public class DmgPropertyListMishBlock {
             blockDescriptors = dis.readInt();
             dis.skipBytes(24);
             byte[] checksumData = new byte[136];
-            dis.read(checksumData, 0, 136);
+            int bytesRead = dis.read(checksumData, 0, 136);
+            if(bytesRead != 136) {
+                throw new IllegalArgumentException(
+                        "Invalid DmgPropertyListMishBlock data. Expected to read 136 bytes for 'checksum'");
+            }
             checksum = new DmgUdifChecksum(checksumData);
             int numberOfBlockChunks = dis.readInt();
 
             blockChunkEntries = new ArrayList<DmgBlockChunkEntry>();
             byte[] blockChunkData = new byte[40];
             for(int i = 0; i < numberOfBlockChunks; i++) {
-                dis.read(blockChunkData);
+                bytesRead = dis.read(blockChunkData);
+                if(bytesRead != 40) {
+                    throw new IllegalArgumentException(
+                            "Invalid DmgPropertyListMishBlock data. Expected to read 40 bytes for 'dmg block chunk data'");
+                }
                 DmgBlockChunkEntry entry = new DmgBlockChunkEntry(blockChunkData);
                 // The block with the type "0xFFFFFFFF" is the end-block and contains
                 // no data we could need, so we simply end here.

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/3aaaed9d/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgTrailer.java
----------------------------------------------------------------------
diff --git a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgTrailer.java b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgTrailer.java
index aa0ba9e..9ea996a 100644
--- a/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgTrailer.java
+++ b/flex-maven-tools/flex-sdk-converter/retrievers/download/src/main/java/org/apache/flex/utilities/converter/retrievers/download/utils/utils/DmgTrailer.java
@@ -52,19 +52,35 @@ public class DmgTrailer {
             segmentNumber = dis.readInt();
             segmentCount = dis.readInt();
             segmentID = new byte[16];
-            dis.read(segmentID, 0, 16);
+            int bytesRead = dis.read(segmentID, 0, 16);
+            if(bytesRead != 16) {
+                throw new IllegalArgumentException(
+                        "Invalid DmgTrailer data. Expected to read 16 bytes for 'segmentID'");
+            }
             dataChecksumType = dis.readInt();
             dataChecksumSize = dis.readInt();
             dataChecksum = new byte[128];
-            dis.read(dataChecksum, 0, 128);
+            bytesRead = dis.read(dataChecksum, 0, 128);
+            if(bytesRead != 128) {
+                throw new IllegalArgumentException(
+                        "Invalid DmgTrailer data. Expected to read 128 bytes for 'dataChecksum'");
+            }
             xmlOffset = dis.readLong();
             xmlLength = dis.readLong();
             byte[] reserved = new byte[120];
-            dis.read(reserved, 0, 120);
+            bytesRead = dis.read(reserved, 0, 120);
+            if(bytesRead != 120) {
+                throw new IllegalArgumentException(
+                        "Invalid DmgTrailer data. Expected to read 120 bytes reserved for future use");
+            }
             checksumType = dis.readInt();
             checksumSize = dis.readInt();
             checksum = new byte[120];
-            dis.read(checksum, 0, 120);
+            bytesRead = dis.read(checksum, 0, 120);
+            if(bytesRead != 120) {
+                throw new IllegalArgumentException(
+                        "Invalid DmgTrailer data. Expected to read 120 bytes for 'checksum'");
+            }
             imageVariant = dis.readInt();
             sectorCount = dis.readLong();
         } catch (IOException e) {