You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/06/09 15:59:00 UTC

[jira] [Commented] (ARTEMIS-6110) json broker properties doesn't load arrays properly

    [ https://issues.apache.org/jira/browse/ARTEMIS-6110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18087705#comment-18087705 ] 

ASF subversion and git services commented on ARTEMIS-6110:
----------------------------------------------------------

Commit 2f7183b97c04e15bef476734f0fb4035f16b1121 in artemis's branch refs/heads/main from Thomas Lavocat
[ https://gitbox.apache.org/repos/asf?p=artemis.git;h=2f7183b97c ]

ARTEMIS-6110 fix JSON broker properties array handling

On origin/main, InsertionOrderedProperties.loadJsonObject handles
OBJECT, STRING, NUMBER, TRUE, FALSE — and throws on anything else.
Any JSON config file containing an array value (routingTypes,
staticConnectors, interceptorClassNames, etc.) causes a hard crash
during broker startup.

Add a case ARRAY: to the switch that joins array elements into a
comma-separated string — the exact format the downstream
parsePrefixedProperties machinery already expects for list-typed
properties.

Add JsonConfigurationFullTest: an exhaustive integration test that
loads a hand-crafted JSON config covering every exportable
configuration section, applies it via parseFileProperties(), and
asserts every configured value. The test resource uses JSON arrays
in ~9 places, directly exercising the fix.

Co-authored-by: Cursor <cu...@cursor.com>


> json broker properties doesn't load arrays properly
> ---------------------------------------------------
>
>                 Key: ARTEMIS-6110
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-6110
>             Project: Artemis
>          Issue Type: Bug
>            Reporter: Thomas Lavocat
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> On origin/main, InsertionOrderedProperties.loadJsonObject parses JSON broker config files into flat key=value properties. Its switch handles OBJECT, STRING, NUMBER, TRUE, FALSE — and throws on anything else via default: throw new IllegalStateException("JSON value type not supported: " + jsonValueType).
> That means any JSON config file containing an array value causes a hard crash during broker startup. For example:
> {
>   "incomingInterceptorClassNames": ["com.example.Interceptor1", "com.example.Interceptor2"],
>   "addressConfigurations": {
>     "orders": {
>       "routingTypes": ["ANYCAST"]
>     }
>   }
> }
> This blows up on routingTypes, incomingInterceptorClassNames, staticConnectors, federationDownstreamAuthorization, etc. — any property that's naturally a list. The only workaround is to avoid arrays in JSON config and use the .properties format instead, which defeats the purpose of having JSON config support.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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