Skip to content

Commit 2575abe

Browse files
Update commons-fileupload2.version to v2.0.0-M4 (#10746)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 039ad7a commit 2575abe

File tree

5 files changed

+13
-25
lines changed

5 files changed

+13
-25
lines changed

bom/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ THE SOFTWARE.
3838
<description>The module contains dependencies that are used by a specific Jenkins version</description>
3939

4040
<properties>
41-
<commons-fileupload2.version>2.0.0-M3</commons-fileupload2.version>
41+
<commons-fileupload2.version>2.0.0-M4</commons-fileupload2.version>
4242
<groovy.version>2.4.21</groovy.version>
43-
<jelly.version>1.1-jenkins-20250108</jelly.version>
44-
<stapler.version>1990.v99d303a_82457</stapler.version>
43+
<jelly.version>1.1-jenkins-20250616</jelly.version>
44+
<stapler.version>1994.vd86361073b_15</stapler.version>
4545
</properties>
4646

4747
<dependencyManagement>

core/src/main/java/hudson/FilePath.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
import java.io.OutputStreamWriter;
7878
import java.io.RandomAccessFile;
7979
import java.io.Serializable;
80-
import java.io.UncheckedIOException;
8180
import java.io.Writer;
8281
import java.net.HttpURLConnection;
8382
import java.net.MalformedURLException;
@@ -1143,8 +1142,6 @@ public void copyFrom(FileItem file) throws IOException, InterruptedException {
11431142
if (channel == null) {
11441143
try {
11451144
file.write(Paths.get(remote));
1146-
} catch (UncheckedIOException e) {
1147-
throw e.getCause();
11481145
} catch (IOException e) {
11491146
throw e;
11501147
} catch (Exception e) {

core/src/main/java/hudson/PluginManager.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,11 +1870,7 @@ static class FileUploadPluginCopier implements PluginCopier {
18701870

18711871
@Override
18721872
public void copy(File target) throws IOException {
1873-
try {
1874-
fileItem.write(Util.fileToPath(target));
1875-
} catch (UncheckedIOException e) {
1876-
throw e.getCause();
1877-
}
1873+
fileItem.write(Util.fileToPath(target));
18781874
}
18791875

18801876
@Override

core/src/main/java/hudson/model/FileParameterValue.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import java.io.IOException;
3636
import java.io.InputStream;
3737
import java.io.OutputStream;
38-
import java.io.UncheckedIOException;
3938
import java.io.UnsupportedEncodingException;
4039
import java.nio.charset.Charset;
4140
import java.nio.file.Files;
@@ -406,25 +405,17 @@ public long getSize() {
406405
}
407406

408407
@Override
409-
public byte[] get() {
410-
try {
411-
return Files.readAllBytes(file.toPath());
412-
} catch (IOException e) {
413-
throw new UncheckedIOException(e);
414-
}
408+
public byte[] get() throws IOException {
409+
return Files.readAllBytes(file.toPath());
415410
}
416411

417412
@Override
418413
public String getString(Charset toCharset) throws IOException {
419-
try {
420-
return new String(get(), toCharset);
421-
} catch (UncheckedIOException e) {
422-
throw e.getCause();
423-
}
414+
return new String(get(), toCharset);
424415
}
425416

426417
@Override
427-
public String getString() {
418+
public String getString() throws IOException {
428419
return new String(get(), Charset.defaultCharset());
429420
}
430421

core/src/main/java/hudson/util/MultipartFormDataParser.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ public MultipartFormDataParser(javax.servlet.http.HttpServletRequest request) th
153153
public String get(String key) {
154154
FileItem fi = byName.get(key);
155155
if (fi == null) return null;
156-
return fi.getString();
156+
try {
157+
return fi.getString();
158+
} catch (IOException e) {
159+
throw new UncheckedIOException(e);
160+
}
157161
}
158162

159163
public FileItem getFileItem2(String key) {

0 commit comments

Comments
 (0)