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 2025/08/27 19:50:39 UTC

(commons-compress) branch master updated (5f30e7e9d -> 46739ece6)

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 5f30e7e9d Add debug logging to diagnose GH CI failures
     new 60b6550c6 Javadoc
     new 46739ece6 Use freeMemory() instead of maxMemory() for object array check

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:
 .../org/apache/commons/compress/harmony/pack200/Pack200Exception.java   | 2 +-
 .../compress/harmony/unpack200/bytecode/AnnotationsAttribute.java       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


(commons-compress) 01/02: Javadoc

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 60b6550c6b52b28027cd92374511ca41787db024
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Wed Aug 27 15:45:17 2025 -0400

    Javadoc
---
 .../compress/harmony/unpack200/bytecode/AnnotationsAttribute.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/AnnotationsAttribute.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/AnnotationsAttribute.java
index d63bdf78b..fd09af326 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/AnnotationsAttribute.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/AnnotationsAttribute.java
@@ -127,7 +127,7 @@ public void writeBody(final DataOutputStream dos) throws IOException {
      */
     public static class ElementValue {
 
-        /** Size in bytes of an instance. */
+        /** Size in bytes of an instance: header, Object, int, int. */
         public static final int BYTES = 8 + 8 + Integer.BYTES + Integer.BYTES;
 
         private final Object value;


(commons-compress) 02/02: Use freeMemory() instead of maxMemory() for object array check

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 46739ece63f7e1dd41e447901235dc15ddd933f2
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Wed Aug 27 15:50:34 2025 -0400

    Use freeMemory() instead of maxMemory() for object array check
---
 .../org/apache/commons/compress/harmony/pack200/Pack200Exception.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200Exception.java b/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200Exception.java
index 76dd3cdfb..94a30bb2f 100644
--- a/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200Exception.java
+++ b/src/main/java/org/apache/commons/compress/harmony/pack200/Pack200Exception.java
@@ -95,7 +95,7 @@ public static int checkIntArray(final int size, final int count) throws Pack200E
      */
     public static int checkObjectArray(final int size, final int objSize) throws Pack200Exception {
         try {
-            MemoryLimitException.checkBytes(Math.multiplyExact(size, objSize), Runtime.getRuntime().totalMemory());
+            MemoryLimitException.checkBytes(Math.multiplyExact(size, objSize), Runtime.getRuntime().freeMemory());
             return size;
         } catch (final MemoryLimitException | ArithmeticException e) {
             throw new Pack200Exception("Can't allocate %,d Objects of size %,d.", size, objSize);