From 66a297d75b81bc6129bd83175bf7a2171799c566 Mon Sep 17 00:00:00 2001 From: Nilan Marktanner Date: Fri, 7 Nov 2025 11:54:46 +0100 Subject: [PATCH] fix: only apply deprecated note when required --- buildscripts/templates/registry/java/SemanticAttributes.java.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildscripts/templates/registry/java/SemanticAttributes.java.j2 b/buildscripts/templates/registry/java/SemanticAttributes.java.j2 index 20a2cfc8..a514686f 100644 --- a/buildscripts/templates/registry/java/SemanticAttributes.java.j2 +++ b/buildscripts/templates/registry/java/SemanticAttributes.java.j2 @@ -42,6 +42,8 @@ public final class {{ my_class_name }} { {%- if attribute is stable -%} {%- if attribute is deprecated -%} {%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%} + {%- else -%} + {%- set deprecated_javadoc = "" -%} {%- endif -%} {{ [attribute.brief, concat_if("\n\nNotes:\n\n", attribute.note), deprecated_javadoc] | comment }} {%- if attribute is deprecated -%}