gnodet commented on code in PR #26219:
URL: https://github.com/apache/camel/pull/26219#discussion_r3961093942
##########
components/camel-jackson3/src/main/java/org/apache/camel/component/jackson3/AbstractJacksonDataFormat.java:
##########
@@ -551,6 +559,14 @@ public void enableFeature(MapperFeature feature) {
}
}
+ public void enableFeature(Enum<? extends DatatypeFeature> feature) {
+ if (enableFeatures == null) {
+ enableFeatures = feature.name();
+ } else {
+ enableFeatures += "," + feature.name();
+ }
+ }
Review Comment:
🔵 **Nit:** The new `enableFeature` overload is a public API method but has
no Javadoc, unlike the `setEnableFeatures` setter above it (which documents the
accepted types). Add at minimum a one-liner linking to `DatatypeFeature` so
users know which concrete types are accepted.
```suggestion
/**
* Enable a feature on the Jackson {@link
tools.jackson.databind.ObjectMapper}. The feature must be an enum
* implementing {@link tools.jackson.databind.cfg.DatatypeFeature} such
as
* {@link tools.jackson.databind.cfg.DateTimeFeature}, {@link
tools.jackson.databind.cfg.EnumFeature} or
* {@link tools.jackson.databind.cfg.JsonNodeFeature}.
*/
public void enableFeature(Enum<? extends DatatypeFeature> feature) {
```
##########
components/camel-jackson3/src/main/java/org/apache/camel/component/jackson3/AbstractJacksonDataFormat.java:
##########
@@ -575,6 +591,14 @@ public void disableFeature(MapperFeature feature) {
}
}
+ public void disableFeature(Enum<? extends DatatypeFeature> feature) {
+ if (disableFeatures == null) {
+ disableFeatures = feature.name();
+ } else {
+ disableFeatures += "," + feature.name();
+ }
+ }
Review Comment:
🔵 **Nit:** Same — `disableFeature(Enum<? extends DatatypeFeature>)` needs
Javadoc matching the pattern of the overload above.
```suggestion
/**
* Disable a feature on the Jackson {@link
tools.jackson.databind.ObjectMapper}. The feature must be an enum
* implementing {@link tools.jackson.databind.cfg.DatatypeFeature} such
as
* {@link tools.jackson.databind.cfg.DateTimeFeature}, {@link
tools.jackson.databind.cfg.EnumFeature} or
* {@link tools.jackson.databind.cfg.JsonNodeFeature}.
*/
public void disableFeature(Enum<? extends DatatypeFeature> feature) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]