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-email.git
commit 1c0be0d75ec95ed2c8444939cdcf26287cf7de27 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Wed Dec 13 16:23:52 2023 -0500 Format tweaks --- src/main/java/org/apache/commons/mail/ByteArrayDataSource.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java b/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java index eeb5b72..b471ee1 100644 --- a/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java +++ b/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java @@ -97,10 +97,8 @@ public class ByteArrayDataSource implements DataSource { */ public ByteArrayDataSource(final String data, final String aType) throws IOException { this.type = aType; - try { baos = new ByteArrayOutputStream(); - // Assumption that the string contains only ASCII characters! // Else just pass in a charset into this constructor and use it in getBytes(). baos.write(data.getBytes(StandardCharsets.ISO_8859_1)); @@ -124,7 +122,6 @@ public class ByteArrayDataSource implements DataSource { private void byteArrayDataSource(final InputStream aIs) throws IOException { BufferedInputStream bis = null; BufferedOutputStream osWriter = null; - try { int length = 0; final byte[] buffer = new byte[ByteArrayDataSource.BUFFER_SIZE]; @@ -139,7 +136,6 @@ public class ByteArrayDataSource implements DataSource { } osWriter.flush(); osWriter.close(); - } finally { if (bis != null) { bis.close();