You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/06/14 12:40:12 UTC
[commons-fileupload] 02/03: Catch no longer needed
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-fileupload.git
commit 3705bb102c238c2d3ff747cefdea15645d4f4626
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jun 13 08:20:58 2023 -0400
Catch no longer needed
---
.../java/org/apache/commons/fileupload2/disk/DiskFileItem.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/disk/DiskFileItem.java b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/disk/DiskFileItem.java
index baa968b..de01372 100644
--- a/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/disk/DiskFileItem.java
+++ b/commons-fileupload2-core/src/main/java/org/apache/commons/fileupload2/disk/DiskFileItem.java
@@ -24,7 +24,6 @@ import java.io.UncheckedIOException;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
-import java.nio.charset.UnsupportedCharsetException;
import java.nio.file.CopyOption;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
@@ -459,11 +458,7 @@ public final class DiskFileItem implements FileItem {
*/
@Override
public String getString() {
- try {
- return new String(get(), getCharset());
- } catch (final UnsupportedCharsetException e) {
- return "";
- }
+ return new String(get(), getCharset());
}
/**