Skip to content

Commit a53be2a

Browse files
author
Edgars Batna
committed
Remove MAX_LABEL_LENGTH to avoid cutting the string in the middle of a unicode char, which corrupts the whole build.
If necessary, this should be done at the view level instead.
1 parent f957a48 commit a53be2a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ public abstract class DurableTaskStep extends Step implements EnvVarsFilterableB
102102

103103
private static final Logger LOGGER = Logger.getLogger(DurableTaskStep.class.getName());
104104

105-
private static final int MAX_LABEL_LENGTH = 100;
106-
107105
private boolean returnStdout;
108106
private String encoding;
109107
private boolean returnStatus;
@@ -145,7 +143,7 @@ public String getLabel() {
145143

146144
@Override public StepExecution start(StepContext context) throws Exception {
147145
if (this.label != null) {
148-
context.get(FlowNode.class).addAction(new LabelAction(StringUtils.left(label, MAX_LABEL_LENGTH)));
146+
context.get(FlowNode.class).addAction(new LabelAction(label));
149147
}
150148
return new Execution(context, this);
151149
}
@@ -173,9 +171,6 @@ public FormValidation doCheckReturnStatus(@QueryParameter boolean returnStdout,
173171
}
174172

175173
public FormValidation doCheckLabel(@QueryParameter String label) {
176-
if (label != null && label.length() > MAX_LABEL_LENGTH) {
177-
return FormValidation.error("Label size exceeds maximum of " + MAX_LABEL_LENGTH + " characters.");
178-
}
179174
return FormValidation.ok();
180175
}
181176

0 commit comments

Comments
 (0)