You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/02/20 00:35:57 UTC

[commons-compress] branch master updated (87fd7cb -> f383b72)

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

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git.


    from 87fd7cb  Use Math.min and Math.max calculations. (#247)
     new 239e199  Use Math.min alculations.
     new f383b72  Use Math.min and Math.max calculations. #247

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/changes/changes.xml                                           | 3 +++
 .../org/apache/commons/compress/compressors/bzip2/BlockSort.java  | 8 ++------
 2 files changed, 5 insertions(+), 6 deletions(-)

[commons-compress] 01/02: Use Math.min alculations.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit 239e19926ea3afd6f095666298fe23aaeaff56e7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Feb 19 19:34:41 2022 -0500

    Use Math.min alculations.
---
 .../org/apache/commons/compress/compressors/bzip2/BlockSort.java  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java
index 3acd239..f6be1d7 100644
--- a/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java
+++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/BlockSort.java
@@ -315,10 +315,6 @@ class BlockSort {
         }
     }
 
-    private int fmin(final int a, final int b) {
-        return Math.min(a, b);
-    }
-
     private void fpush(final int sp, final int lz, final int hz) {
         stack_ll[sp] = lz;
         stack_hh[sp] = hz;
@@ -421,9 +417,9 @@ class BlockSort {
                 continue;
             }
 
-            n = fmin(ltLo - lo, unLo - ltLo);
+            n = Math.min(ltLo - lo, unLo - ltLo);
             fvswap(fmap, lo, unLo - n, n);
-            int m = fmin(hi - gtHi, gtHi - unHi);
+            int m = Math.min(hi - gtHi, gtHi - unHi);
             fvswap(fmap, unHi + 1, hi - m + 1, m);
 
             n = lo + unLo - ltLo - 1;

[commons-compress] 02/02: Use Math.min and Math.max calculations. #247

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit f383b7286a66eb0efd47b12f78f5a8d21b072161
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Feb 19 19:35:55 2022 -0500

    Use Math.min and Math.max calculations. #247
---
 src/changes/changes.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e7fcf63..eb8aef5 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -79,6 +79,9 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="fix" dev="ggregory" due-to="Peter Dettman">
         bzip2: calculate median-of-3 on unsigned values #242.
       </action>
+      <action type="fix" dev="ggregory" due-to="Arturo Bernal, Gary Gregory, Bruno P. Kinoshita">
+        Use Math.min and Math.max calculations. #247.
+      </action>
       <!-- ADD -->
       <action issue="COMPRESS-602" type="add" dev="ggregory" due-to="Postelnicu George, Gary Gregory">
         Migrate zip package to use NIO #236.