From 44a56e5a54582d2ca75125feeb8bdc205cfd82d2 Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Thu, 5 Jan 2017 11:24:56 +0000 Subject: [PATCH] [FIXED JENKINS-40827] Clarify the content of ObjectMetadataAction's getDescription() and getDisplayName() --- .../jenkins/scm/api/metadata/ObjectMetadataAction.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/jenkins/scm/api/metadata/ObjectMetadataAction.java b/src/main/java/jenkins/scm/api/metadata/ObjectMetadataAction.java index 2e521c8c..23d73ddf 100644 --- a/src/main/java/jenkins/scm/api/metadata/ObjectMetadataAction.java +++ b/src/main/java/jenkins/scm/api/metadata/ObjectMetadataAction.java @@ -25,6 +25,7 @@ package jenkins.scm.api.metadata; import edu.umd.cs.findbugs.annotations.CheckForNull; +import hudson.Util; import hudson.model.InvisibleAction; import java.io.Serializable; import jenkins.scm.api.SCMHead; @@ -77,7 +78,8 @@ public ObjectMetadataAction(@CheckForNull String objectDisplayName, } /** - * Returns the display name of the object or {@code null}. + * Returns the display name of the object or {@code null}. Consumers should assume the content is plain text that + * needs escaping with {@link Util#escape(String)} when being included in HTML output. * * @return the display name of the object or {@code null} */ @@ -89,9 +91,10 @@ public String getObjectDisplayName() { } /** - * Returns the description of the object or {@code null}. + * Returns the description of the object or {@code null}. Consumers should assume the content is plain text that + * needs escaping with {@link Util#escape(String)} when being included in HTML output. * - * @return the description of the object or {@code null} + * @return the description of the object or {@code null}. */ @Exported @CheckForNull