[ 
https://issues.apache.org/jira/browse/CAMEL-26894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-26894:
--------------------------------
    Fix Version/s: 4.24.0

> camel-package-maven-plugin - no default value for java.lang.Boolean options 
> that declare none
> ---------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26894
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26894
>             Project: Camel
>          Issue Type: Improvement
>          Components: tooling
>    Affects Versions: 4.23.0
>            Reporter: Saravanakumar Selvaraj
>            Assignee: Saravanakumar Selvaraj
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> EndpointSchemaGeneratorMojo.getDefaultValue 
> (tooling/maven/camel-package-maven-plugin) sets the default value to false 
> for every boolean option that declares no default. This also applies to 
> options of type java.lang.Boolean, where null often means "not set" and 
> another default applies. The generated metadata and the website then show 
> "Default: false", which can be wrong.
> Examples from camel-cxf, both declared as Boolean without a defaultValue:
> - allowStreaming: when not set, the endpoint uses the JVM system property 
> org.apache.camel.component.cxf.streaming and allows streaming when that 
> property is not set either.
> - wrappedStyle: when not set, CXF chooses the style itself (the 
> parameterStyle of the SOAPBinding annotation, or the wrapped style when there 
> is none).
> Both show "Default: false", which contradicts their descriptions as updated 
> in https://github.com/apache/camel/pull/29725.
> In the current catalog, 169 component and endpoint options of type 
> java.lang.Boolean in 54 components have the default value false. Some declare 
> it, the others get it from the generator.
> Suggestion: emit no default value for java.lang.Boolean options that declare 
> none, and keep false for primitive boolean options. An option whose null 
> value really means false can declare defaultValue = "false".
> This came up in the review of apache/camel#29725 (CAMEL-23832).
> This issue was drafted by Claude on behalf of Saravanakumar Selvaraj.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to