You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by as...@apache.org on 2019/03/01 11:22:43 UTC

[oozie] branch master updated: OOZIE-3395 amend [build] Migration from FindBugs to SpotBugs (kmarton via asalamon74)

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

asalamon74 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/oozie.git


The following commit(s) were added to refs/heads/master by this push:
     new 205db9e  OOZIE-3395 amend [build] Migration from FindBugs to SpotBugs (kmarton via asalamon74)
205db9e is described below

commit 205db9e4fb846da0e1af81f1207cf137a24f603a
Author: Andras Salamon <as...@apache.org>
AuthorDate: Fri Mar 1 12:22:03 2019 +0100

    OOZIE-3395 amend [build] Migration from FindBugs to SpotBugs (kmarton via asalamon74)
---
 bin/test-patch-11-spotbugs-diff | 23 +++++++----------------
 release-log.txt                 |  1 +
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/bin/test-patch-11-spotbugs-diff b/bin/test-patch-11-spotbugs-diff
index 240180d..58a52f6 100755
--- a/bin/test-patch-11-spotbugs-diff
+++ b/bin/test-patch-11-spotbugs-diff
@@ -39,8 +39,6 @@ FINDBUGS_DIFF_XML=findbugs-new.xml
 cleanup_and_exit() {
   remove_file_if_present "${DIFF_DIR}/${FINDBUGS_JAR}"
   remove_file_if_present "${DIFF_DIR}/${FINDBUGS_JAR}.md5"
-  remove_file_if_present "${DIFF_DIR}/${FINDBUGS_JAR}.md5sum"
-
   exit "$1"
 }
 
@@ -182,29 +180,22 @@ download_and_check_findbugs_diff_jar() {
   echo "[TRACE] FindBugs diff JAR downloaded"
 
   if hash md5 2>/dev/null; then
-    md5 -q "${DIFF_DIR}/${FINDBUGS_JAR}" > "${DIFF_DIR}/${FINDBUGS_JAR}.md5"
+    echo "[TRACE] Calculating md5 content using md5"
+    md5Content="$(md5 -q "${DIFF_DIR}/${FINDBUGS_JAR}")"
   elif hash md5sum 2>/dev/null; then
-    md5Content="$(md5sum "${DIFF_DIR}/${FINDBUGS_JAR}")"
-    echo "${md5Content}" > "${DIFF_DIR}/${FINDBUGS_JAR}.md5sum"
+    echo "[TRACE] Calculating md5 content using md5sum"
+    md5Content="$(md5sum "${DIFF_DIR}/${FINDBUGS_JAR}" | awk '{ print $1 }')"
   else
     echo "[ERROR] Neither md5 nor md5sum are present, cannot check FindBugs diff JAR"
     summary_both "{color:red}-1{color} Neither md5 nor md5sum are present, cannot check FindBugs diff JAR."
     cleanup_and_exit 1
   fi
+  echo "${md5Content}" > "${DIFF_DIR}/${FINDBUGS_JAR}.md5"
 
-  if hash md5 2>/dev/null; then
-    jarMd5DiffCount=$(grep -cFxvf "${BASH_DIR}/${FINDBUGS_JAR}.md5" "${DIFF_DIR}/${FINDBUGS_JAR}.md5")
-  elif hash md5sum 2>/dev/null; then
-    jarMd5DiffCount=$(grep -cFxvf "${BASH_DIR}/${FINDBUGS_JAR}.md5sum" "${DIFF_DIR}/${FINDBUGS_JAR}.md5sum")
-  fi
+  jarMd5DiffCount=$(diff "${BASH_DIR}"/${FINDBUGS_JAR}.md5 "${DIFF_DIR}"/${FINDBUGS_JAR}.md5 | wc -l)
 
   if [ "${jarMd5DiffCount}" -gt "0" ]; then
-    if hash md5 2>/dev/null; then
-      echo "[TRACE] md5 of FindBugs diff jar is $(cat "${DIFF_DIR}"/${FINDBUGS_JAR}.md5)"
-    elif hash md5sum 2>/dev/null; then
-      echo "[TRACE] md5sum of FindBugs diff jar is $(cat "${DIFF_DIR}"/${FINDBUGS_JAR}.md5sum)"
-    fi
-
+    echo "[TRACE] md5 hash of FindBugs diff jar is $(cat "${DIFF_DIR}"/${FINDBUGS_JAR}.md5)"
     echo "[ERROR] FindBugs diff JAR has a weird MD5 sum, rejecting"
     summary_both "{color:red}-1{color} FindBugs diff JAR has a weird MD5 sum, rejecting."
     cleanup_and_exit 1
diff --git a/release-log.txt b/release-log.txt
index 71d63fb..2a77671 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 5.2.0 release (trunk - unreleased)
 
+OOZIE-3395 amend [build] Migration from FindBugs to SpotBugs (kmarton via asalamon74)
 OOZIE-3440 [action] Oozie Spark action replaces path symlink # to %23 (dionusos via asalamon74)
 OOZIE-3409 Oozie Server : Memory leak in EL evaluation (asalamon74 via kmarton)
 OOZIE-3441 Upgrade jackson version to 2.6.5 (nobigo via asalamon74)