johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [johnzon] rmannibucau commented on a change in pull request #67: [JOHNZON-319] Map all properties supported by MapperBuilder in JohnzonBuilder
Date Wed, 29 Jul 2020 17:43:31 GMT

rmannibucau commented on a change in pull request #67:

File path: johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/
@@ -131,9 +131,12 @@ public Jsonb build() {
                     return it;
-        if (config.getProperty(JsonbConfig.FORMATTING).map(Boolean.class::cast).orElse(false))
-            builder.setPretty(true);
-        }
+        config.getProperty(JsonbConfig.FORMATTING).map(Boolean.class::cast).ifPresent(builder::setPretty);
+        config.getProperty(AbstractJsonFactory.BUFFER_STRATEGY).map(String::valueOf).ifPresent(builder::setBufferStrategy);

Review comment:
       Yep, it shouldn't have been.
   Was ok-ish in standalone/ee because it was not in the main case where jsonp impl was loaded
automatically so not that visible in terms of classloading and runtime but this breaks the
module design (and OSGi metadata).
   It is fine to copy these strings in the builder (inline if triggered cause jsonp != null
for backward compat) and we should just use a Map<String, ?> for the main case (single
property, for instance "" and ""
- <jsonbimpl>.<config area>.<component>.<property> pattern?).
   Will enable to handle any jsonp impl configuration and future properties addition without
anything more.

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.

For queries about this service, please contact Infrastructure at:

View raw message