<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Martin,</p>
<p><br>
</p>
<p>I'll make these changes for #1-#3. &nbsp;I'm not in favor of #4. &nbsp;Its not consistent with our existing method. &nbsp;(I'd prefer consistency of our API over consistency with the Java lang's spec)</p>
<p><br>
</p>
<p>I may get to them this evening.</p>
<p><br>
</p>
<p>John</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> cdi-dev-bounces@lists.jboss.org &lt;cdi-dev-bounces@lists.jboss.org&gt; on behalf of Martin Kouba &lt;mkouba@redhat.com&gt;<br>
<b>Sent:</b> Monday, November 21, 2016 8:25 AM<br>
<b>To:</b> cdi-dev<br>
<b>Subject:</b> [cdi-dev] CDI-471 and repeatable annotations</font>
<div>&nbsp;</div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Dear EG,<br>
<br>
during the review of CDI API 2.0.Alpha5 with modified Annotated SPI [1] <br>
I came across few questionable parts:<br>
<br>
1. We should be more clear that the original methods like <br>
Annotated.getAnnotations() or Annotated.isAnnotationPresent() DO NOT <br>
support repeatable annotations - this is what Reflection API does to <br>
remain backward compatible - see also AnnotatedElement javadoc [2]<br>
2. Thus AnnotatedElement.getAnnotation(Class&lt;T&gt;) should not be <br>
deprecated - for the same reasons as <br>
AnnotatedElement.getAnnotation(Class&lt;T&gt;) is not<br>
3. We should provide a default implementation of <br>
Annotated.getAnnotations(Class&lt;T&gt;), otherwise a lot of extensions <br>
providing their own Annotated implementations would be broken<br>
4. We should consider renaming the method to &quot;getAnnotationsByType()&quot; to <br>
keep it simple for users used to Reflection API<br>
<br>
Thanks,<br>
<br>
Martin<br>
<br>
[1]<br>
<a href="https://github.com/cdi-spec/cdi/pull/330" id="LPlnk357370" previewremoved="true">https://github.com/cdi-spec/cdi/pull/330</a>
<div id="LPBorder_GT_14797357939090.1580039421017605" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14797357939060.9105270971326171" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="ImageCell_14797357939060.9531177329305014" colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;">
<div id="LPImageContainer_14797357939070.8257336978183474" style="background-color: rgb(255, 255, 255); height: 250px; position: relative; margin: auto; display: table; width: 250px;">
<a id="LPImageAnchor_14797357939070.058970711835304224" href="https://github.com/cdi-spec/cdi/pull/330" target="_blank" style="display: table-cell; text-align: center;"><img aria-label="Preview image with link selected. Double-tap to open the link." id="LPThumbnailImageID_14797357939070.940695190127208" style="display: inline-block; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px; vertical-align: bottom;" width="250" height="250" src="https://avatars3.githubusercontent.com/u/108167?v=3&amp;s=400"></a></div>
</td>
<td id="TextCell_14797357939080.8648446685342559" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14797357939080.5374069724703685"></div>
<div id="LPTitle_14797357939080.45811178430652144" style="top: 0px; color: rgb(227, 30, 37); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, &quot;Segoe UI Light&quot;, &quot;Segoe WP Light&quot;, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14797357939080.7912964091555394" href="https://github.com/cdi-spec/cdi/pull/330" target="_blank" style="text-decoration: none;">CDI-471 Introduce SPI for retrieving multiple annotations of the same&#8230; by johnament · Pull Request #330 · cdi-spec/cdi</a></div>
<div id="LPMetadata_14797357939080.32064559631223255" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
github.com</div>
<div id="LPDescription_14797357939090.5954521954395127" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
&#8230; type, deprecating the old one. Updated spec docs for qualifiers to reflect repeatability and spec docs for annotated for new method.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
[2]<br>
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AnnotatedElement.html" id="LPlnk520564" previewremoved="true">https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AnnotatedElement.html</a>
<div id="LPBorder_GT_14797357930400.9219170683612801" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14797357930360.9401376417446006" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14797357930380.15781321880220123" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14797357930380.10678596928549267"></div>
<div id="LPTitle_14797357930380.4085224277571031" style="top: 0px; color: rgb(227, 30, 37); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, &quot;Segoe UI Light&quot;, &quot;Segoe WP Light&quot;, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14797357930390.3642940560189909" href="https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AnnotatedElement.html" target="_blank" style="text-decoration: none;">AnnotatedElement (Java Platform SE 8 ) - Oracle</a></div>
<div id="LPMetadata_14797357930390.8090383849969041" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
docs.oracle.com</div>
<div id="LPDescription_14797357930400.8336260887770426" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Represents an annotated element of the program currently running in this VM. This interface allows annotations to be read reflectively. All annotations returned by ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
cdi-dev@lists.jboss.org<br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" id="LPlnk704551" previewremoved="true">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>
<div id="LPBorder_GT_14797358522590.03509028612610199" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14797358522570.8781713144389931" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14797358522570.8912472147408665" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14797358522580.09784747882111788"></div>
<div id="LPTitle_14797358522580.6771315143032879" style="top: 0px; color: rgb(227, 30, 37); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, &quot;Segoe UI Light&quot;, &quot;Segoe WP Light&quot;, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14797358522580.7130263005182176" href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank" style="text-decoration: none;">cdi-dev Info Page - JBoss Developer</a></div>
<div id="LPMetadata_14797358522580.9440109019387097" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.jboss.org</div>
<div id="LPDescription_14797358522580.6215516709971647" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
List to discuss the development of CDI (the specification) To see the collection of prior postings to the list, visit the cdi-dev Archives.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" id="LPlnk58329" previewremoved="true">http://www.apache.org/licenses/LICENSE-2.0.html</a>).
 For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
<div id="LPBorder_GT_14797358522110.4681566789836933" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14797358522100.4082726177570213" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14797358522100.643664407752983" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14797358522100.1785982916155635"></div>
<div id="LPTitle_14797358522100.6287987334447789" style="top: 0px; color: rgb(227, 30, 37); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, &quot;Segoe UI Light&quot;, &quot;Segoe WP Light&quot;, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14797358522100.4088445988252265" href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank" style="text-decoration: none;">Apache License, Version 2.0</a></div>
<div id="LPMetadata_14797358522110.21448487499305458" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
www.apache.org</div>
<div id="LPDescription_14797358522110.1088710205365293" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, &quot;Segoe UI&quot;, &quot;Segoe WP&quot;, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION. 1. Definitions.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
<hr>
NOTICE: This e-mail message and any attachments may contain confidential, proprietary, and/or privileged information which should be treated accordingly. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this
 message, and destroy all physical and electronic copies. Thank you.
</body>
</html>