You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by co...@apache.org on 2015/09/19 21:18:11 UTC

bigtop git commit: BIGTOP-2057. null check doesn't safeguard against non-existing values in the BOM config

Repository: bigtop
Updated Branches:
  refs/heads/master 3f07e7c6f -> 724ddf1fc


BIGTOP-2057. null check doesn't safeguard against non-existing values in the BOM config


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/724ddf1f
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/724ddf1f
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/724ddf1f

Branch: refs/heads/master
Commit: 724ddf1fcd85883fd98d1f41389600a0c36ff344
Parents: 3f07e7c
Author: Konstantin Boudnik <co...@apache.org>
Authored: Sat Sep 19 11:39:11 2015 -0700
Committer: Konstantin Boudnik <co...@apache.org>
Committed: Sat Sep 19 12:00:35 2015 -0700

----------------------------------------------------------------------
 packages.gradle | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/724ddf1f/packages.gradle
----------------------------------------------------------------------
diff --git a/packages.gradle b/packages.gradle
index fa83ecd..ad6b7ab 100644
--- a/packages.gradle
+++ b/packages.gradle
@@ -543,13 +543,15 @@ def genTasks = { target ->
     config.bigtop.components[target].seedtar = config.bigtop.builddir + "/$target/tar/" + config.bigtop.components[target].tarball.destination
 
     config.bigtop.components[target].downloadurl =
-        (config.bigtop.components[target].url.site != null && config.bigtop.components[target].tarball.source != null) ?
+        (!config.bigtop.components[target].url.isEmpty() &&
+            !config.bigtop.components[target].url.site.isEmpty() &&
+            !config.bigtop.components[target].tarball.source.isEmpty()) ?
             config.bigtop.components[target].url.site + '/' + config.bigtop.components[target].tarball.source : null
-    config.bigtop.components[target].downloaddst = (config.bigtop.components[target].tarball.source != null) ?
-        DL_DIR + '/' + config.bigtop.components[target].tarball.source : null
+        if (!config.bigtop.components[target].tarball.source.isEmpty())
+          config.bigtop.components[target].downloaddst = DL_DIR + '/' + config.bigtop.components[target].tarball.source
 
     // test that the download url will return http 200.  If it does not, use the ARCHIVE url instead of the MIRROR SITE url
-    if (!ifExists(config.bigtop.components[target].downloadurl)) {
+    if (!config.bigtop.components[target].url.isEmpty() && !ifExists(config.bigtop.components[target].downloadurl)) {
       config.bigtop.components[target].downloadurl = config.bigtop.components[target].url.archive + '/' + config.bigtop.components[target].tarball.source
     }