Skip to content

Commit 8f4b220

Browse files
authored
Merge branch '2.19' into feature/4771-add-feature-for-qnames
2 parents 6eb0e17 + cfef132 commit 8f4b220

38 files changed

+911
-108
lines changed

.github/workflows/cifuzz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
dry-run: false
3131
language: jvm
3232
- name: Upload Crash
33-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
33+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
3434
if: failure() && steps.build.outcome == 'success'
3535
with:
3636
name: artifacts

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727

2828
# Initializes the CodeQL tools for scanning.
2929
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
30+
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
3131
with:
3232
languages: ${{ matrix.language }}
3333

3434
- name: Autobuild
35-
uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
35+
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
3636

3737
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
38+
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8

.github/workflows/dep_build_v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424
- name: Set up JDK
25-
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
25+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
2626
with:
2727
distribution: 'temurin'
2828
java-version: ${{ matrix.java_version }}

.github/workflows/dep_build_v3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
ref: master
2626
- name: Set up JDK
27-
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
27+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
2828
with:
2929
distribution: 'temurin'
3030
java-version: ${{ matrix.java_version }}

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4242
- name: Set up JDK
43-
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
43+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
4444
with:
4545
distribution: 'temurin'
4646
java-version: ${{ matrix.java_version }}
@@ -72,7 +72,7 @@ jobs:
7272
run: ./mvnw -B -q -ff -ntp test
7373
- name: Publish code coverage
7474
if: ${{ matrix.release_build && github.event_name != 'pull_request' }}
75-
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
75+
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
7676
with:
7777
token: ${{ secrets.CODECOV_TOKEN }}
7878
file: ./target/site/jacoco/jacoco.xml

pom.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,14 @@
392392
<release>17</release>
393393
<compilerArgs>
394394
<arg>-parameters</arg>
395-
<arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
396-
<arg>--add-opens=java.base/java.util=ALL-UNNAMED</arg>
397395
</compilerArgs>
398396
</configuration>
399397
</plugin>
400398
<plugin>
401399
<groupId>org.apache.maven.plugins</groupId>
402400
<artifactId>maven-surefire-plugin</artifactId>
403401
<configuration>
404-
<argLine>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
402+
<argLine>--add-opens=java.base/java.util=ALL-UNNAMED</argLine>
405403
</configuration>
406404
<executions>
407405
<execution>
@@ -458,16 +456,14 @@
458456
<release>21</release>
459457
<compilerArgs>
460458
<arg>-parameters</arg>
461-
<arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
462-
<arg>--add-opens=java.base/java.util=ALL-UNNAMED</arg>
463459
</compilerArgs>
464460
</configuration>
465461
</plugin>
466462
<plugin>
467463
<groupId>org.apache.maven.plugins</groupId>
468464
<artifactId>maven-surefire-plugin</artifactId>
469465
<configuration>
470-
<argLine>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
466+
<argLine>--add-opens=java.base/java.util=ALL-UNNAMED</argLine>
471467
</configuration>
472468
</plugin>
473469
</plugins>

release-notes/CREDITS-2.x

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,3 +1909,7 @@ Floris Westerman (@FWest98)
19091909
* Reported #4934: `DeserializationContext.readTreeAsValue()` handles null nodes
19101910
differently from `ObjectMapper.treeToValue()`
19111911
(2.19.0)
1912+
1913+
Joren Inghelbrecht (@jin-harmoney)
1914+
* Contributed #4953: Allow clearing all caches to avoid classloader leaks
1915+
(2.19.0)

release-notes/VERSION-2.x

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Project: jackson-databind
1818
server and client side
1919
(requested by @qianlong)
2020
(contributed by Geoffrey G)
21+
#4388: Allow using `@JsonPropertyOrder` with "any" (`@JsonAnyGetter`) properties
22+
(fix by Joo-Hyuk K)
2123
#4674: Allow setting global enum naming strategy similar to property naming strategy
2224
(requested by @hajdamak)
2325
(contributed by Konstantin M)
@@ -46,6 +48,15 @@ Project: jackson-databind
4648
#4934: `DeserializationContext.readTreeAsValue()` handles null nodes
4749
differently from `ObjectMapper.treeToValue()`
4850
(reported by Floris W)
51+
#4953: Allow clearing all caches to avoid classloader leaks
52+
(contributed by Joren I)
53+
#4955: Add more remove methods for `ArrayNode`, `ObjectNode` [STEP-3]
54+
#4959: Add explicit deserializer for `ThreadGroup`
55+
#4961: Serialization for `JsonFormat.Shape.ARRAY` does not work when
56+
there is `@JsonAnyGetter`
57+
(fix by Joo-Hyuk K)
58+
#4963: Serializing `Map.Entry` as Bean with `@JsonFormat.shape = Shape.OBJECT`
59+
fails on JDK 17+
4960
5061
2.18.3 (not yet released)
5162

src/main/java/com/fasterxml/jackson/databind/DeserializationContext.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,19 @@ public final KeyDeserializer findKeyDeserializer(JavaType keyType,
707707
return kd;
708708
}
709709

710+
/**
711+
* Method that will drop all dynamically constructed deserializers (ones that
712+
* are counted as result value for {@link DeserializerCache#cachedDeserializersCount}).
713+
* This can be used to remove memory usage (in case some deserializers are
714+
* only used once or so), or to force re-construction of deserializers after
715+
* configuration changes for mapper than owns the provider.
716+
717+
* @since 2.19
718+
*/
719+
public void flushCachedDeserializers() {
720+
_cache.flushCachedDeserializers();
721+
}
722+
710723
/*
711724
/**********************************************************
712725
/* Public API, ObjectId handling

src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,15 @@ public enum DeserializationFeature implements ConfigFeature
371371

372372
/**
373373
* Feature that can be enabled to allow JSON empty String
374-
* value ("") to be bound as `null` for POJOs and other structured
374+
* value ({@code ""}) to be bound as {@code null} for POJOs and other structured
375375
* values ({@link java.util.Map}s, {@link java.util.Collection}s).
376-
* If disabled, standard POJOs can only be bound from JSON `null` or
376+
* If disabled, standard POJOs can only be bound from JSON {@code null} or
377377
* JSON Object (standard meaning that no custom deserializers or
378378
* constructors are defined; both of which can add support for other
379379
* kinds of JSON values); if enabled, empty JSON String can be taken
380380
* to be equivalent of JSON null.
381381
*<p>
382-
* NOTE: this does NOT apply to scalar values such as booleans, numbers
382+
* NOTE: this does NOT apply to scalar values such as Strings, booleans, numbers
383383
* and date/time types;
384384
* whether these can be coerced depends on
385385
* {@link MapperFeature#ALLOW_COERCION_OF_SCALARS}.
@@ -390,13 +390,13 @@ public enum DeserializationFeature implements ConfigFeature
390390

391391
/**
392392
* Feature that can be enabled to allow empty JSON Array
393-
* value (that is, <code>[ ]</code>) to be bound to POJOs (and
394-
* with 2.9, other values too) as `null`.
395-
* If disabled, standard POJOs can only be bound from JSON `null` or
393+
* value (that is, {@code[ ]} to be bound to POJOs (and
394+
* with 2.9, other values too) as {@code null}.
395+
* If disabled, standard POJOs can only be bound from JSON {@code null} or
396396
* JSON Object (standard meaning that no custom deserializers or
397397
* constructors are defined; both of which can add support for other
398398
* kinds of JSON values); if enabled, empty JSON Array will be taken
399-
* to be equivalent of JSON null.
399+
* to be equivalent of JSON {@code null}.
400400
*<p>
401401
* Feature is disabled by default.
402402
*

0 commit comments

Comments
 (0)