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 2023/07/01 21:55:15 UTC

[commons-imaging] branch master updated (34ce8a08 -> b5316974)

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-imaging.git


    from 34ce8a08 Merge pull request #299 from apache/dependabot/github_actions/ossf/scorecard-action-2.2.0
     new 81af9529 Delegate size() call
     new b5316974 Let API return what it found.

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:
 .../java/org/apache/commons/imaging/bytesource/ByteSource.java    | 2 +-
 .../java/org/apache/commons/imaging/common/BinaryFunctions.java   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)


[commons-imaging] 02/02: Let API return what it found.

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-imaging.git

commit b5316974a015f439549056d5f0c28a62ac663b3c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jul 1 17:55:11 2023 -0400

    Let API return what it found.
---
 .../java/org/apache/commons/imaging/common/BinaryFunctions.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java b/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java
index ba9a2806..a75fd868 100644
--- a/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java
+++ b/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java
@@ -281,13 +281,13 @@ public final class BinaryFunctions {
         return false;
     }
 
-    public static void skipBytes(final InputStream is, final long length) throws IOException {
-        skipBytes(is, length, "Couldn't skip bytes");
+    public static long skipBytes(final InputStream is, final long length) throws IOException {
+        return skipBytes(is, length, "Couldn't skip bytes");
     }
 
-    public static void skipBytes(final InputStream is, final long length, final String exception) throws IOException {
+    public static long skipBytes(final InputStream is, final long length, final String exception) throws IOException {
         try {
-            IOUtils.skip(is, length);
+            return IOUtils.skip(is, length);
         } catch (IOException e) {
             throw new IOException(exception, e);
         }


[commons-imaging] 01/02: Delegate size() call

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-imaging.git

commit 81af9529b24ac6b4bab39736ac09b0f4fe3e1c26
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jul 1 17:54:50 2023 -0400

    Delegate size() call
---
 src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java b/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java
index 3d2e5d55..56a14964 100644
--- a/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java
+++ b/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java
@@ -92,7 +92,7 @@ public class ByteSource {
      * @throws IOException if it fails to read the byte source data
      */
     public long size() throws IOException {
-        return origin.getByteArray().length;
+        return origin.size();
     }
 
     @Override