[
https://issues.apache.org/jira/browse/CAMEL-11675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16531282#comment-16531282
]
ASF GitHub Bot commented on CAMEL-11675:
----------------------------------------
davsclaus commented on a change in pull request #2391: CAMEL-11675 - Repetable
@Metadata annotation and amend apt for tooling
URL: https://github.com/apache/camel/pull/2391#discussion_r199783973
##########
File path:
tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
##########
@@ -359,12 +359,22 @@ protected ComponentModel
findComponentProperties(RoundEnvironment roundEnv, UriE
model.setLenientProperties(uriEndpoint.lenientProperties());
model.setAsync(implementsInterface(processingEnv, roundEnv,
endpointClassElement, "org.apache.camel.AsyncEndpoint"));
+ String deprecationNote = null;
// what is the first version this component was added to Apache Camel
String firstVersion = uriEndpoint.firstVersion();
- if (Strings.isNullOrEmpty(firstVersion) &&
endpointClassElement.getAnnotation(Metadata.class) != null) {
- // fallback to @Metadata if not from @UriEndpoint
- firstVersion =
endpointClassElement.getAnnotation(Metadata.class).firstVersion();
+ Metadata[] metadataArray =
endpointClassElement.getAnnotationsByType(Metadata.class);
+ for(Metadata metadata : metadataArray) {
Review comment:
code formatting looks like a checkstyle problem here
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> @Metadata should be repeatable
> ------------------------------
>
> Key: CAMEL-11675
> URL: https://issues.apache.org/jira/browse/CAMEL-11675
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Luca Burgazzoli
> Priority: Minor
> Fix For: 2.23.0
>
>
> As today @Metadata is not repeatable so it is not easy to add multiple
> information to i.e. a component, it would be nice to write something like:
> {code:java}
> @Metadata(key = "platforms", enums = { "spring", "spring-boot", "osgi" })
> @Metadata(key = "extensions", types = { MyExtension.cass })
> class MyComponent extends DefaultComponent {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)