diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java index 21ac7767c9a37f31adcb2d121e0200de90fa2f9b..b1d9dfeb587a2d755c8a2eafaeff54aa90d2a6fd 100644 --- a/core/src/main/java/hudson/Util.java +++ b/core/src/main/java/hudson/Util.java @@ -710,6 +710,7 @@ public class Util { * Escapes HTML unsafe characters like <, & to the respective character entities. */ public static String escape(String text) { + if (text==null) return null; StringBuilder buf = new StringBuilder(text.length()+64); for( int i=0; i + * This message is used as a tooltip to describe jobs in the queue. The text should be one line without + * new line. No HTML allowed (the caller will perform necessary HTML escapes, so any text can be returend.) + * + * @since 1.323 + */ + public String getShortDescription() { + return toString(); + } } diff --git a/core/src/main/java/hudson/model/Queue.java b/core/src/main/java/hudson/model/Queue.java index 2a5cdeab5b99d33c113787372c669bd8cffe84d3..9ec8876f15e8e58d364d531a55190183129bd36a 100644 --- a/core/src/main/java/hudson/model/Queue.java +++ b/core/src/main/java/hudson/model/Queue.java @@ -1153,16 +1153,16 @@ public class Queue extends ResourceController implements Saveable { */ @Exported public String getParams() { - String s = ""; + StringBuilder s = new StringBuilder(); for(Action action : getActions()) { if(action instanceof ParametersAction) { ParametersAction pa = (ParametersAction)action; for (ParameterValue p : pa.getParameters()) { - s = s + "
" + p.toString(); + s.append('\n').append(p.getShortDescription()); } } } - return s; + return s.toString(); } public boolean hasCancelPermission() { diff --git a/core/src/main/java/hudson/model/RunParameterValue.java b/core/src/main/java/hudson/model/RunParameterValue.java index 3ed2f6051645b12f38a605046ecf3dd91865f3c8..f7daf600e99dd0c2cb76642f078d73f403139239 100644 --- a/core/src/main/java/hudson/model/RunParameterValue.java +++ b/core/src/main/java/hudson/model/RunParameterValue.java @@ -27,13 +27,6 @@ import org.kohsuke.stapler.DataBoundConstructor; import java.util.Map; -import com.thoughtworks.xstream.converters.Converter; -import com.thoughtworks.xstream.converters.MarshallingContext; -import com.thoughtworks.xstream.converters.UnmarshallingContext; -import com.thoughtworks.xstream.io.HierarchicalStreamWriter; -import com.thoughtworks.xstream.io.HierarchicalStreamReader; -import hudson.util.Secret; - public class RunParameterValue extends ParameterValue { private final String runId; @@ -66,7 +59,7 @@ public class RunParameterValue extends ParameterValue { } @Override - public String toString() { + public String getShortDescription() { return "(RunParameterValue) " + getName() + "='" + getRunId() + "'"; } diff --git a/core/src/main/resources/lib/hudson/queue.jelly b/core/src/main/resources/lib/hudson/queue.jelly index ba29f93cc116d806aba1c04d6a9e82abca1e2684..b04405b4070d9639129622a493c32f7c6acfdbaf 100644 --- a/core/src/main/resources/lib/hudson/queue.jelly +++ b/core/src/main/resources/lib/hudson/queue.jelly @@ -57,7 +57,7 @@ THE SOFTWARE. - +