diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 69a75a8b..209bb31e 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,3 +5,7 @@ updates:
open-pull-requests-limit: 10
schedule:
interval: "monthly"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "monthly"
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index bb63cd56..64b395c2 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -19,15 +19,15 @@ jobs:
timeout-minutes: 30
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.jdk }}
- uses: actions/setup-java@v4
+ uses: actions/setup-java@v5
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: maven
- name: Cache local Maven repository
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
diff --git a/pom.xml b/pom.xml
index 6d992b70..4c019aae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
org.netpreserve.commons
webarchive-commons
- 3.0.4
+ 3.0.5-SNAPSHOT
jar
webarchive-commons
@@ -68,7 +68,7 @@
org.json
json
- 20251224
+ 20260522
org.htmlparser
@@ -172,7 +172,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.5.5
+ 3.5.6
de.thetaphi
diff --git a/src/main/java/org/archive/format/gzip/GZIPDecoder.java b/src/main/java/org/archive/format/gzip/GZIPDecoder.java
index ef2998a5..9a8f7451 100644
--- a/src/main/java/org/archive/format/gzip/GZIPDecoder.java
+++ b/src/main/java/org/archive/format/gzip/GZIPDecoder.java
@@ -75,7 +75,7 @@ public long alignOnMagic3(InputStream is) throws IOException {
// !??
// nope. are the next 2 possibilities?
if((lookahead[1] == GZIP_MAGIC_ONE) &&
- (lookahead[2] == GZIP_MAGIC_TWO)) {
+ ((lookahead[2] & 0xff) == GZIP_MAGIC_TWO)) {
// !12
keep = 2;
} else if(lookahead[2] == GZIP_MAGIC_ONE) {
diff --git a/src/main/java/org/archive/resource/MetaData.java b/src/main/java/org/archive/resource/MetaData.java
index fb3b24a4..9b7747d8 100755
--- a/src/main/java/org/archive/resource/MetaData.java
+++ b/src/main/java/org/archive/resource/MetaData.java
@@ -28,8 +28,8 @@ public MetaData(MetaData parentMetaData, String name) {
this.topMetaData = this;
} else {
topMetaData = parentMetaData.topMetaData;
+ parentMetaData.putChild(name, this);
}
- parentMetaData.putChild(name, this);
}
public MetaData(String jsonString) throws JSONException {
diff --git a/src/main/java/org/archive/util/ByteOp.java b/src/main/java/org/archive/util/ByteOp.java
index fc27d04a..74a52f15 100755
--- a/src/main/java/org/archive/util/ByteOp.java
+++ b/src/main/java/org/archive/util/ByteOp.java
@@ -237,7 +237,7 @@ public static String drawHex(byte[] b, int bytesPerRow) {
return drawHex(b,0,b.length,bytesPerRow);
}
public static String drawHex(byte[] b, int offset, int length, int bytesPerRow) {
- int rows = (int) Math.ceil(length / bytesPerRow);
+ int rows = (int) Math.ceil((double) length / bytesPerRow);
if(rows == 0) {
rows = 1;
}
diff --git a/src/main/java/org/archive/util/StreamCopy.java b/src/main/java/org/archive/util/StreamCopy.java
index 52523edc..53a1b812 100755
--- a/src/main/java/org/archive/util/StreamCopy.java
+++ b/src/main/java/org/archive/util/StreamCopy.java
@@ -27,7 +27,7 @@ public static long copy(InputStream i, OutputStream o, int bytes) throws IOExcep
}
public static long copyLength(InputStream i, OutputStream o, long bytes) throws IOException {
- return copyLength(i,o,DEFAULT_READ_SIZE);
+ return copyLength(i,o,bytes,DEFAULT_READ_SIZE);
}
public static long copyLength(InputStream i, OutputStream o, long bytes, int readSize) throws IOException {