Skip to content

Commit 846d00a

Browse files
committed
Handle unassigned object mappers and inconsistent asString/asText usage, remove unused properties
1 parent 329bc3f commit 846d00a

5 files changed

Lines changed: 4 additions & 5 deletions

File tree

components/camel-cbor/src/main/java/org/apache/camel/component/cbor/CBORDataFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ protected void doInit() throws Exception {
388388
}
389389

390390
if (prettyPrint) {
391-
objectMapper.rebuild()
391+
objectMapper = objectMapper.rebuild()
392392
.enable(SerializationFeature.INDENT_OUTPUT)
393393
.build();
394394
}

components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonUriSchemaLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public Schema createSchema(CamelContext camelContext, String schemaUri) throws E
4747
// Detect version from $schema field if present
4848
SpecificationVersion version = defaultVersion;
4949
if (node.has("$schema")) {
50-
String dialectId = node.get("$schema").asText();
50+
String dialectId = node.get("$schema").asString();
5151
version = SpecificationVersion.fromDialectId(dialectId).orElse(defaultVersion);
5252
}
5353

components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/serializer/jackson/ObjectMapperHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static ObjectMapper create(JacksonModule customModule) {
4444
.addModule(simpleModule)
4545
.build();
4646
if (customModule != null) {
47-
objectMapper.rebuild().addModule(customModule);
47+
objectMapper = objectMapper.rebuild().addModule(customModule).build();
4848
}
4949

5050
return objectMapper;

components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/utils/AsNestedPropertyDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public Object deserializeTypedFromObject(JsonParser p, DeserializationContext ct
5757
}
5858
node = nestedProperty;
5959
}
60-
ValueDeserializer<Object> deser = _findDeserializer(ctxt, node.asText());
60+
ValueDeserializer<Object> deser = _findDeserializer(ctxt, node.asString());
6161
try (JsonParser jsonParser = new TreeTraversingParser(originalNode, ctxt)) {
6262
if (jsonParser.currentToken() == null) {
6363
jsonParser.nextToken();

parent/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@
428428
<netty-reactive-streams-version>2.0.5</netty-reactive-streams-version>
429429
<networknt-json-schema-validator-version>3.0.0</networknt-json-schema-validator-version>
430430
<nimbus-jose-jwt>10.8</nimbus-jose-jwt>
431-
<nitrite-version>3.4.4</nitrite-version>
432431
<olingo2-version>2.0.13</olingo2-version>
433432
<olingo4-version>5.0.0</olingo4-version>
434433
<ognl-version>3.4.10</ognl-version>

0 commit comments

Comments
 (0)