Skip to content

Commit a088cdb

Browse files
authored
Merge branch 'dnsjava:master' into master
2 parents 26635f7 + 6278133 commit a088cdb

147 files changed

Lines changed: 3940 additions & 1834 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/download-artifact/action.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,25 @@ runs:
1616
steps:
1717
- name: Download artifacts
1818
if: github.event_name != 'workflow_run'
19-
uses: actions/download-artifact@v4
19+
uses: actions/download-artifact@v7
2020
with:
2121
pattern: ${{ inputs.name }}
2222
path: ${{ inputs.path }}
2323
merge-multiple: true
2424

2525
- name: Download artifacts
2626
if: github.event_name == 'workflow_run'
27-
uses: dawidd6/action-download-artifact@v6
27+
#v12
28+
uses: dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392
2829
with:
2930
workflow: ${{ github.event.workflow_run.name }}
3031
run_id: ${{ github.event.workflow_run.id }}
3132
name: ${{ inputs.name }}
3233
path: ${{ inputs.path }}
34+
name_is_regexp: true
3335

3436
- name: Extract artifacts
37+
if: github.event_name != 'workflow_run'
3538
run: |
3639
for t in ${{ inputs.name }}*.tar
3740
do
@@ -40,7 +43,20 @@ runs:
4043
shell: bash
4144
working-directory: ${{ inputs.path }}
4245

46+
- name: Extract artifacts
47+
if: github.event_name == 'workflow_run'
48+
run: |
49+
for t in ${{ inputs.name }}/${{ inputs.name }}*.tar
50+
do
51+
mv "${t}" .
52+
tar -xvf "${t}"
53+
done
54+
shell: bash
55+
working-directory: ${{ inputs.path }}
56+
4357
- name: Remove archive
44-
run: rm -f ${{ inputs.name }}*.tar
58+
run: |
59+
rm -f ${{ inputs.name }}.tar
60+
rm -f ${{ inputs.name }}.zip
4561
shell: bash
4662
working-directory: ${{ inputs.path }}

.github/actions/prepare-analysis/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ runs:
3838
echo "check_name<<EOF"$'\n'"${check_name}EOF" >> $GITHUB_OUTPUT
3939
4040
- name: Publish Test Report
41-
uses: mikepenz/action-junit-report@v4
41+
#v6.1.0
42+
uses: mikepenz/action-junit-report@a294a61c909bd8a4b563024a2faa28897fd53ebc
4243
with:
4344
commit: ${{ github.event.workflow_run.head_sha }}
4445
report_paths: ${{ steps.junit_paths.outputs.report_paths }}
@@ -48,15 +49,15 @@ runs:
4849
detailed_summary: true
4950

5051
- name: Set up JDK
51-
uses: actions/setup-java@v4
52+
uses: actions/setup-java@v5
5253
with:
5354
java-version: ${{ env.BUILD_JAVA_VERSION }}
5455
distribution: temurin
5556
cache: ${{ inputs.cache }}
5657

5758
- name: Cache SonarCloud packages
5859
if: inputs.cache
59-
uses: actions/cache@v4
60+
uses: actions/cache@v5
6061
with:
6162
path: ~/.sonar/cache
6263
key: ${{ runner.os }}-sonar

.github/actions/upload-artifact/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ runs:
3838
shell: bash
3939

4040
- name: Upload artifacts
41-
uses: actions/upload-artifact@v4
41+
uses: actions/upload-artifact@v6
4242
with:
4343
if-no-files-found: ${{ inputs.if-no-files-found }}
4444
name: ${{ inputs.name }}

.github/workflows/analyze.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
checks: write
1414

1515
env:
16-
BUILD_JAVA_VERSION: '21'
16+
BUILD_JAVA_VERSION: '25'
1717

1818
jobs:
1919
analyze:
@@ -24,7 +24,8 @@ jobs:
2424
steps:
2525
- name: Download PR number artifact
2626
id: get_pr_number
27-
uses: dawidd6/action-download-artifact@v6
27+
#v12
28+
uses: dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392
2829
with:
2930
workflow: ${{ github.event.workflow_run.name }}
3031
run_id: ${{ github.event.workflow_run.id }}
@@ -39,7 +40,8 @@ jobs:
3940
- name: Request PR data from GitHub API
4041
id: get_pr_data
4142
if: steps.get_pr_number.outputs.found_artifact
42-
uses: octokit/[email protected]
43+
#v2.4.0
44+
uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d
4345
env:
4446
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547
with:
@@ -48,22 +50,21 @@ jobs:
4850
number: ${{ steps.pr_number.outputs.pr_number }}
4951

5052
- name: Checkout PR
51-
uses: actions/checkout@v4
53+
uses: actions/checkout@v6
5254
with:
5355
repository: ${{ github.event.workflow_run.head_repository.full_name }}
5456
ref: ${{ github.event.workflow_run.head_sha }}
57+
persist-credentials: false
58+
path: pr
5559
# for Sonar
5660
fetch-depth: 0
5761

58-
- name: Make sure 'base' doesn't exist
59-
shell: bash
60-
run: rm -rf base
61-
6262
- name: Checkout base
63-
uses: actions/checkout@v4
63+
uses: actions/checkout@v6
6464
with:
6565
repository: ${{ github.event.repository.full_name }}
6666
ref: ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
67+
persist-credentials: false
6768
path: base
6869

6970
- name: Get analysis data
@@ -73,11 +74,18 @@ jobs:
7374
env:
7475
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7576
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
77+
WF_REVISION: ${{ github.event.workflow_run.head_sha }}
78+
WF_PRKEY: ${{ fromJson(steps.get_pr_data.outputs.data).number }}
79+
WF_BRANCH: ${{ fromJson(steps.get_pr_data.outputs.data).head.ref }}
80+
WF_BASE: ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
7681
run: |
77-
cp -f base/pom.xml .
82+
cp -f base/pom.xml pr/
83+
cd pr
7884
mvn -B \
79-
-Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }} \
80-
-Dsonar.pullrequest.key=${{ fromJson(steps.get_pr_data.outputs.data).number }} \
81-
-Dsonar.pullrequest.branch=${{ fromJson(steps.get_pr_data.outputs.data).head.ref }} \
82-
-Dsonar.pullrequest.base=${{ fromJson(steps.get_pr_data.outputs.data).base.ref }} \
85+
-f pom.xml \
86+
-Dsonar.scm.revision='${WF_REVISION}' \
87+
-Dsonar.pullrequest.key='${WF_PRKEY}' \
88+
-Dsonar.pullrequest.branch='${WF_BRANCH}' \
89+
-Dsonar.pullrequest.base='${WF_BASE}' \
90+
properties:read-project-properties \
8391
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

.github/workflows/build.yml

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- 'release/**'
1212

1313
env:
14-
BUILD_JAVA_VERSION: '21'
14+
BUILD_JAVA_VERSION: '25'
1515

1616
jobs:
1717
test:
@@ -21,7 +21,7 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
os: [ ubuntu-latest, windows-latest ]
24-
java: [ '8', '11', '17', '21' ]
24+
java: [ '8', '11', '17', '21', '25' ]
2525
arch: [ 'x64' ]
2626
include:
2727
- os: windows-latest
@@ -32,10 +32,12 @@ jobs:
3232

3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v6
36+
with:
37+
persist-credentials: false
3638

3739
- name: Set up JDK ${{ matrix.java }}
38-
uses: actions/setup-java@v4
40+
uses: actions/setup-java@v5
3941
with:
4042
java-version: ${{ matrix.java }}
4143
architecture: ${{ matrix.arch }}
@@ -45,15 +47,18 @@ jobs:
4547
- name: Build with Maven
4648
shell: bash
4749
run: |
48-
TEST_EXCLUSIONS=$([ '${{ matrix.java }}' == '21' ] && echo "" || echo "concurrency" )
49-
# don't exit immediately
50-
set +e
50+
TEST_EXCLUSIONS=$([ '${{ matrix.java }}' == '25' ] && echo "" || echo "concurrency" )
5151
mvn verify \
5252
-B \
5353
-Dsurefire.rerunFailingTestsCount=2 \
5454
-"Dgpg.skip" \
5555
-DexcludedGroups="${TEST_EXCLUSIONS}" \
5656
jacoco:report
57+
58+
- name: Copy build reports
59+
shell: bash
60+
if: always() # always run even if the previous step fails
61+
run: |
5762
cd target
5863
mv jacoco.exec jacoco-${{ matrix.java }}-${{ matrix.arch }}-${{ matrix.os }}.exec
5964
mv surefire-reports surefire-reports-${{ matrix.java }}-${{ matrix.arch }}-${{ matrix.os }}
@@ -97,10 +102,12 @@ jobs:
97102
needs: test
98103
steps:
99104
- name: Checkout
100-
uses: actions/checkout@v4
105+
uses: actions/checkout@v6
106+
with:
107+
persist-credentials: false
101108

102109
- name: Set up JDK
103-
uses: actions/setup-java@v4
110+
uses: actions/setup-java@v5
104111
with:
105112
java-version: ${{ env.BUILD_JAVA_VERSION }}
106113
distribution: temurin
@@ -133,7 +140,7 @@ jobs:
133140

134141
- name: Archive PR number
135142
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'dnsjava'
136-
uses: actions/upload-artifact@v4
143+
uses: actions/upload-artifact@v6
137144
with:
138145
name: pr_number
139146
path: pr_number.txt
@@ -145,8 +152,9 @@ jobs:
145152
if: github.event_name == 'push' || github.event.pull_request.head.repo.owner.login == 'dnsjava'
146153
steps:
147154
- name: Checkout
148-
uses: actions/checkout@v4
155+
uses: actions/checkout@v6
149156
with:
157+
persist-credentials: false
150158
# for Sonar
151159
fetch-depth: 0
152160

@@ -156,9 +164,8 @@ jobs:
156164
cache: maven
157165

158166
- name: Run codecov
159-
uses: codecov/codecov-action@v4
160-
env:
161-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
167+
#v5.5.2
168+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
162169

163170
# doesn't work with PRs from forks, see
164171
# https://portal.productboard.com/sonarsource/1-sonarcloud/c/50-sonarcloud-analyzes-external-pull-request
@@ -167,30 +174,34 @@ jobs:
167174
env:
168175
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169176
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
170-
run: mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
177+
run: mvn -B properties:read-project-properties org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
171178

172179
release:
173180
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')
174181
needs: test
175182
runs-on: ubuntu-latest
176183
steps:
177-
- uses: actions/checkout@v4
184+
- name: Checkout
185+
uses: actions/checkout@v6
186+
with:
187+
persist-credentials: false
178188

179189
- name: Set up JDK ${{ env.BUILD_JAVA_VERSION }}
180-
uses: actions/setup-java@v4
190+
uses: actions/setup-java@v5
181191
with:
182192
java-version: ${{ env.BUILD_JAVA_VERSION }}
183193
architecture: 'x64'
184194
distribution: temurin
185195
cache: maven
186-
server-id: ossrh
196+
server-id: central
187197
server-username: SONATYPE_USER
188198
server-password: SONATYPE_PW
189199

190200
- name: Release to Maven Central
191201
env:
192202
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
193203
SONATYPE_PW: ${{ secrets.SONATYPE_PW }}
204+
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PW }}
194205
run: |
195206
cat <(echo -e "${{ secrets.GPG_KEY }}") | gpg --batch --import
196207
gpg --list-secret-keys --keyid-format LONG
@@ -205,10 +216,8 @@ jobs:
205216
mvn \
206217
--no-transfer-progress \
207218
--batch-mode \
208-
-Dgpg.passphrase="${{ secrets.GPG_PW }}" \
209219
-DperformRelease=true \
210220
-DskipTests \
211-
-Dmaven.test.skip.exec \
212221
-Dcheckstyle.skip \
213222
-Dspotless.check.skip=true \
214223
-Danimal.sniffer.skip=true \

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,20 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v6
29+
with:
30+
persist-credentials: false
2931

3032
# Initializes the CodeQL tools for scanning.
3133
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@v3
34+
uses: github/codeql-action/init@v4
3335
with:
3436
languages: java
3537

36-
- name: Set up JDK 21
37-
uses: actions/setup-java@v4
38+
- name: Set up JDK 25
39+
uses: actions/setup-java@v5
3840
with:
39-
java-version: 21
41+
java-version: 25
4042
distribution: temurin
4143
check-latest: true
4244
cache: maven
@@ -46,7 +48,6 @@ jobs:
4648
run: |
4749
mvn clean package -B -V \
4850
-DskipTests \
49-
-Dmaven.test.skip.exec \
5051
-Dgpg.skip \
5152
-Dcheckstyle.skip \
5253
-Denforcer.skip \
@@ -57,4 +58,4 @@ jobs:
5758
test-compile
5859
5960
- name: Perform CodeQL Analysis
60-
uses: github/codeql-action/analyze@v3
61+
uses: github/codeql-action/analyze@v4

Changelog

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
01/18/2026
2+
- 3.6.4 released
3+
- Fix Zone-class serialization (#391)
4+
- Avoid Double DNS Lookup for Names with Labels >= ndots (#388)
5+
- Prevent NPE when calling Message#getTSIG() on DNS request with
6+
bad header (#384)
7+
- Unwrap an exception in the legacy callback-based async interface (#383)
8+
- Prevent ConcurrentModificationException in NIO clients
9+
(#379, @bhaveshthakker)
10+
- Handle `null` in all setSearchPath overloads equally (#157)
11+
- Reduce warning level of invalid `hosts` file entries (#371)
12+
- Remove a lock on the hot-path in the `hosts` file parser (#371)
13+
- DoH Resolver makes use of the Multi-Release jar and tests are executed
14+
for Java 8 and 11+ implementations (#385)
15+
- Fix DoH Resolver initial request delay (#385)
16+
17+
01/26/2025
18+
- 3.6.3 released
19+
- Support custom hosts file size (@flaming-archer, #349)
20+
- Fix origin handling in zone loaded from file or stream (#346)
21+
- Prevent TCP port leak when closing IO (#351)
22+
- Fix confusing parameter name in CNAMERecord (@chkal, #354)
23+
- Optionally disable ShutdownHook in NioClient (@SvenssonWeb, #359)
24+
- TSIG algorithm names from RFC 8945
25+
- Message.toWire can exceed MAXLENGTH (#355)
26+
- TCP query might fail if the shared buffer is full (#357)
27+
- Dynamic updates silently truncates records (#356)
28+
- Fix DoH initial request using recommended nanoTime calculation
29+
(@LinZong, #345)
30+
31+
09/21/2024
32+
- 3.6.2 released
33+
- Add new IANA Trust Anchor (@technolord, #337)
34+
- Fix Zone handling with signed SOA (@frankarinnet, #335)
35+
136
07/28/2024
237
- 3.6.1 released
338
- Properly fix LookupSession doesn't cache CNAMEs (#316)

0 commit comments

Comments
 (0)