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

Nicola Ferraro commented on CAMEL-10951:
----------------------------------------

[~davsclaus] I'm trying your approach, but cannot get useful info. There's 
something I'm missing...

Even if manage to evaluate the initializer expression (the field initializer 
returns null), are you sure we can get its value? I mean, the maven plugin does 
not use the application classpath, so it should not be able to evaluate an 
expression like "MailConstants.XXX" because it doesn't know what 
"MailConstants" is.. unless we so some hacks with the classloader...

I'm trying a naive approach in the meantime.

> Invalid default field values in Spring Boot ComponentConfiguration classes
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-10951
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10951
>             Project: Camel
>          Issue Type: Bug
>          Components: build system
>    Affects Versions: 2.19.0
>            Reporter: James Netherton
>            Assignee: Nicola Ferraro
>             Fix For: 2.19.0
>
>
> Some components default their endpoint configuration using constant fields. 
> For example, the camel-mail {{MailConfiguration}} class has:
> {code}
> private String from = MailConstants.MAIL_DEFAULT_FROM;
> {code}
> When the MailComponentConfiguration is generated, it has a field defaulted as 
> follows:
> {code}
> private String from = "MailConstants.MAIL_DEFAULT_FROM";
> {code}
> Not sure exactly how many components are impacted by this but there's a few 
> listed if you do:
> {code}
> grep "DEFAULT" $(find . -name "*ComponentConfiguration.java")
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to