Skip to content

Commit 66a297d

Browse files
fix: only apply deprecated note when required
1 parent f1029d1 commit 66a297d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

buildscripts/templates/registry/java/SemanticAttributes.java.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public final class {{ my_class_name }} {
4242
{%- if attribute is stable -%}
4343
{%- if attribute is deprecated -%}
4444
{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%}
45+
{%- else -%}
46+
{%- set deprecated_javadoc = "" -%}
4547
{%- endif -%}
4648
{{ [attribute.brief, concat_if("\n\nNotes:\n\n", attribute.note), deprecated_javadoc] | comment }}
4749
{%- if attribute is deprecated -%}

0 commit comments

Comments
 (0)