You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "lavocatt (via GitHub)" <gi...@apache.org> on 2026/09/01 14:11:19 UTC

[PR] ARTEMIS-6220 Emit scalar properties first [artemis]

lavocatt opened a new pull request, #6659:
URL: https://github.com/apache/artemis/pull/6659

   Split loadJsonObject/loadYamlMap into two passes — scalars first, then nested objects — so that discriminator values like uri are always set before a lazy-init getter (e.g. getTransportConfigurations) can fire during object path resolution. Without this, key ordering in the source file could cause silent data loss.
   
   Assisted-by: Claude Opus 4.6 <no...@anthropic.com>


-- 
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: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] ARTEMIS-6220 Emit scalar properties first [artemis]

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully commented on code in PR #6659:
URL: https://github.com/apache/artemis/pull/6659#discussion_r3912161106


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java:
##########
@@ -3970,9 +3984,22 @@ private String determineSurroundString(ConfigurationImpl configuration, Map<Stri
       }
 
       private void loadJsonObject(String keySurroundString, String parentKey, JsonObject jsonObject) {
+         // process scalar entries before nested objects — scalar setters must complete
+         // before nested property resolution triggers getters that may lazily depend on
+         // sibling scalar values (e.g., uri must be set before transportConfigurations
+         // is accessed, because getTransportConfigurations() lazily calls parseURI())
+         loadJsonEntries(keySurroundString, parentKey, jsonObject, false);
+         loadJsonEntries(keySurroundString, parentKey, jsonObject, true);
+      }
+
+      private void loadJsonEntries(String keySurroundString, String parentKey, JsonObject jsonObject, boolean objects) {

Review Comment:
   a better variable name for 'boolean objects' possible, parseObjects? Just to ease understanding



-- 
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: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] ARTEMIS-6220 Emit scalar properties first [artemis]

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully merged PR #6659:
URL: https://github.com/apache/artemis/pull/6659


-- 
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: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


Re: [PR] ARTEMIS-6220 Emit scalar properties first [artemis]

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully commented on code in PR #6659:
URL: https://github.com/apache/artemis/pull/6659#discussion_r3912161106


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java:
##########
@@ -3970,9 +3984,22 @@ private String determineSurroundString(ConfigurationImpl configuration, Map<Stri
       }
 
       private void loadJsonObject(String keySurroundString, String parentKey, JsonObject jsonObject) {
+         // process scalar entries before nested objects — scalar setters must complete
+         // before nested property resolution triggers getters that may lazily depend on
+         // sibling scalar values (e.g., uri must be set before transportConfigurations
+         // is accessed, because getTransportConfigurations() lazily calls parseURI())
+         loadJsonEntries(keySurroundString, parentKey, jsonObject, false);
+         loadJsonEntries(keySurroundString, parentKey, jsonObject, true);
+      }
+
+      private void loadJsonEntries(String keySurroundString, String parentKey, JsonObject jsonObject, boolean objects) {

Review Comment:
   a better variable name possible, parseObjects? Just to ease understanding



-- 
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: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org