Skip to content

Commit 1cf03fd

Browse files
authored
Merge pull request #241 from jglick/commons-lang
Remove usage of Commons Lang 2
2 parents 022285f + f993061 commit 1cf03fd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/io/jenkins/plugins/file_parameters/AbstractFileParameterValue.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import java.io.OutputStream;
4141
import jenkins.model.Jenkins;
4242
import org.apache.commons.io.IOUtils;
43-
import org.apache.commons.lang.StringUtils;
4443
import org.kohsuke.stapler.AncestorInPath;
4544
import org.kohsuke.stapler.StaplerResponse2;
4645

@@ -92,7 +91,7 @@ public void close() throws IOException {
9291

9392
protected FilePath createTempFile(@NonNull Run<?,?> build, @NonNull FilePath tempDir, @NonNull EnvVars env, @NonNull Launcher launcher, @NonNull TaskListener listener) throws IOException, InterruptedException {
9493
assert Util.isOverridden(AbstractFileParameterValue.class, getClass(), "open", Run.class);
95-
FilePath f = tempDir.createTempFile(StringUtils.rightPad(name, 3, 'x'), null);
94+
FilePath f = tempDir.createTempFile(name.length() >= 3 ? name : "fileparam", null);
9695
try (InputStream is = open(build)) {
9796
f.copyFrom(is);
9897
}

0 commit comments

Comments
 (0)