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

ASF GitHub Bot commented on CAMEL-11675:
----------------------------------------

dmvolod 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_r200194991
 
 

 ##########
 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:
   @onderson , please note, that right now -Psourcecheck option doesn't stop 
build and just print audit message warning and you need to check it manually.

----------------------------------------------------------------
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)

Reply via email to