Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.16] 3.16.3 backports 1 #44450

Merged
merged 24 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
57ab518
Remove use of Json in OIDC
geoand Nov 6, 2024
210f763
Scheduler: fix OffLoadingInvoker
mkouba Nov 6, 2024
37576b2
Allow for using RuntimeDelegate SPI in native mode
geoand Nov 6, 2024
98f9892
Do not try to list synthetic injection points in "inactive bean" errors
yrodiere Nov 6, 2024
c6376e3
Small improvements to the Google Cloud Function guides
loicmathieu Nov 6, 2024
7136484
Update opentelemetry-tracing.adoc
fhavel Nov 6, 2024
1f38df1
Do not run the Gradle tests when using -DquicklyDocs
gsmet Nov 5, 2024
64de796
Add some useful workflow tips to CONTRIBUTING.md
gsmet Nov 5, 2024
1027099
Make sure the result from QCL.getElementsWithResource(name) does not …
aloubyansky Nov 5, 2024
59658df
avoid duplication descriptors in PlatformImportsImpl
cdsap Oct 28, 2024
0fe6369
Make @QuarkusMainTest respect `quarkus.test.profile.tags`
geoand Nov 7, 2024
6d1c3dd
Qute: fix generation of qute-i18n-examples
mkouba Nov 8, 2024
ce81314
Fix some invalid configuration cases
gsmet Nov 8, 2024
53dc796
Fix Keycloak DevService property doc typo
sberyozkin Nov 8, 2024
ec0a40d
QuteErrorPageSetup: support templates that are not backed by a file
mkouba Nov 11, 2024
2e2c25a
Fix deserialization of null maps in reflection-free Jackson deseriali…
mariofusco Nov 11, 2024
7f81c66
Propagate Runtime properties in JBang Dev mode
radcortez Nov 11, 2024
ed41748
Enable Brotli decompression
zakkak Nov 6, 2024
cbc47ed
Adds decompressor tests
Karm Nov 9, 2024
dd35a81
Test loads brotli to do compression
Karm Nov 11, 2024
93072af
forcing initializing compilejava if empty
cdsap Nov 12, 2024
4b1a5d8
Hibernate: Silence DB connection info logging
gastaldi Nov 12, 2024
8aaeac7
Bump io.micrometer:micrometer-bom from 1.13.6 to 1.13.7
dependabot[bot] Nov 11, 2024
76a0ed6
Bump resteasy.version from 6.2.10.Final to 6.2.11.Final
dependabot[bot] Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix deserialization of null maps in reflection-free Jackson deseriali…
…zers

(cherry picked from commit f23faa2)
mariofusco authored and gsmet committed Nov 12, 2024

Verified

This commit was signed with the committer’s verified signature.
gsmet Guillaume Smet
commit 2e2c25a6ba5f4a7d962d2f21b50d90698c5bfd72
Original file line number Diff line number Diff line change
@@ -239,18 +239,18 @@ private boolean deserializeObject(ClassInfo classInfo, ResultHandle objHandle, C
ResultHandle nextField = loopCreator
.invokeInterfaceMethod(ofMethod(Iterator.class, "next", Object.class), fieldsIterator);
ResultHandle mapEntry = loopCreator.checkCast(nextField, Map.Entry.class);
ResultHandle fieldName = loopCreator
.invokeInterfaceMethod(ofMethod(Map.Entry.class, "getKey", Object.class), mapEntry);
ResultHandle fieldValue = loopCreator.checkCast(loopCreator
.invokeInterfaceMethod(ofMethod(Map.Entry.class, "getValue", Object.class), mapEntry), JsonNode.class);

loopCreator.ifTrue(loopCreator.invokeVirtualMethod(ofMethod(JsonNode.class, "isNull", boolean.class), fieldValue))
.trueBranch().continueScope(loopCreator);
BytecodeCreator fieldReader = loopCreator
.ifTrue(loopCreator.invokeVirtualMethod(ofMethod(JsonNode.class, "isNull", boolean.class), fieldValue))
.falseBranch();

ResultHandle fieldName = fieldReader
.invokeInterfaceMethod(ofMethod(Map.Entry.class, "getKey", Object.class), mapEntry);
Switch.StringSwitch strSwitch = fieldReader.stringSwitch(fieldName);

Set<String> deserializedFields = new HashSet<>();
ResultHandle deserializationContext = deserialize.getMethodParam(1);
Switch.StringSwitch strSwitch = loopCreator.stringSwitch(fieldName);
return deserializeFields(classCreator, classInfo, deserializationContext, objHandle, fieldValue, deserializedFields,
return deserializeFields(classCreator, classInfo, deserialize.getMethodParam(1), objHandle, fieldValue, new HashSet<>(),
strSwitch, parseTypeParameters(classInfo, classCreator));
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package io.quarkus.resteasy.reactive.jackson.deployment.test;

import java.util.Map;

public class MapWrapper {

private String name;
private Map<String, String> properties;

public MapWrapper() {
}

public MapWrapper(String name) {
this.name = name;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public Map<String, String> getProperties() {
return properties;
}

public void setProperties(Map<String, String> properties) {
this.properties = properties;
}
}
Original file line number Diff line number Diff line change
@@ -123,6 +123,13 @@ public StateRecord echoDog(StateRecord stateRecord) {
return stateRecord;
}

@POST
@Path("/null-map-echo")
@Consumes(MediaType.APPLICATION_JSON)
public MapWrapper echoNullMap(MapWrapper mapWrapper) {
return mapWrapper;
}

@EnableSecureSerialization
@GET
@Path("/abstract-cat")
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ public JavaArchive get() {
AbstractPet.class, Dog.class, Cat.class, Veterinarian.class, AbstractNamedPet.class,
AbstractUnsecuredPet.class, UnsecuredPet.class, SecuredPersonInterface.class, Frog.class,
Pond.class, FrogBodyParts.class, FrogBodyParts.BodyPart.class, ContainerDTO.class,
NestedInterface.class, StateRecord.class)
NestedInterface.class, StateRecord.class, MapWrapper.class)
.addAsResource(new StringAsset("admin-expression=admin\n" +
"user-expression=user\n" +
"birth-date-roles=alice,bob\n"), "application.properties");
@@ -733,4 +733,18 @@ public void testRecordEcho() {
assertTrue(first >= 0);
assertEquals(first, last);
}

@Test
public void testNullMapEcho() {
RestAssured
.with()
.body(new MapWrapper("test"))
.contentType("application/json; charset=utf-8")
.post("/simple/null-map-echo")
.then()
.statusCode(200)
.contentType("application/json")
.body("name", Matchers.is("test"))
.body("properties", Matchers.nullValue());
}
}
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ public JavaArchive get() {
AbstractPet.class, Dog.class, Cat.class, Veterinarian.class, AbstractNamedPet.class,
AbstractUnsecuredPet.class, UnsecuredPet.class, SecuredPersonInterface.class, Frog.class,
Pond.class, FrogBodyParts.class, FrogBodyParts.BodyPart.class, ContainerDTO.class,
NestedInterface.class, StateRecord.class)
NestedInterface.class, StateRecord.class, MapWrapper.class)
.addAsResource(new StringAsset("admin-expression=admin\n" +
"user-expression=user\n" +
"birth-date-roles=alice,bob\n" +