<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<blockquote type="cite"
cite="mid:1739217450.1056514.1578694747821.JavaMail.zimbra@u-pem.fr">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">The
Deprecated attribute is, effectively, Deprecated. So I'm
not interested in giving it any life support. </blockquote>
<div><br>
</div>
<div>I think there is a confusion somewhere.<br
data-mce-bogus="1">
</div>
<div>The JVMS has no word about deprecating the attribute
Deprecated, javac 14 is using it, so i don't understand.<br>
</div>
<div><br data-mce-bogus="1">
</div>
<div>For me, a record component is at the same level as a
field or a method, by example, they all have their own
sub-attributes.</div>
<div> Given that both a field and a method are using the
attribute Deprecated, it is logical that a record component
also uses the attribute Deprecated.<br data-mce-bogus="1">
</div>
<div>The current state seems like a gratuitous discrepancy.<br
data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div>So perhaps in the future, we may deprecate the attribute
Deprecated but that's another story, for another time.<br
data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
<br>
Nope. We have zero interest in keeping this attribute on life
support.  (And my remaining attention budget for this entire topic
is about 5m, so it's mostly used just writing this mail.)Â <br>
<br>
<blockquote type="cite"
cite="mid:1739217450.1056514.1578694747821.JavaMail.zimbra@u-pem.fr">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<div><br data-mce-bogus="1">
</div>
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br>
However, it is reasonable to allow the @Deprecated
annotation on record components. And, you can apply it
there now! And if you do, it will get propagated to fields,
accessors, and constructor parameters, and reflection will
reflect the right thing -- because its an annotation. </blockquote>
<div><br>
</div>
<div>yes, but it will not be stored as a runtime visible
annotation on a record component in the bytecode.<br
data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
<br>
WHy not? It is a runtime-visible annotation:<br>
<br>
<pre style="background-color:#ffffff;color:#000000;font-family:'Consolas';font-size:12.0pt;">@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.PACKAGE, ElementType.MODULE, ElementType.PARAMETER, ElementType.TYPE})
<span style="color:#000080;font-weight:bold;">public </span>@<span style="color:#000080;font-weight:bold;">interface </span>Deprecated {
</pre>
<br>
</body>
</html>