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-net.git
commit 1812bddd7e389a36520a449a3f496ebbadd0b726 Author: Gary Gregory <[email protected]> AuthorDate: Tue Jun 24 07:38:00 2025 -0400 Simplify initialization System.lineSeparator() is already a constant --- .../org/apache/commons/net/io/FromNetASCIIInputStream.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java b/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java index 21cd949e..9b97d21a 100644 --- a/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java +++ b/src/main/java/org/apache/commons/net/io/FromNetASCIIInputStream.java @@ -30,15 +30,9 @@ import org.apache.commons.net.util.NetConstants; * from NETASCII. */ public final class FromNetASCIIInputStream extends PushbackInputStream { - static final boolean _noConversionRequired; - static final String _lineSeparator; - static final byte[] _lineSeparatorBytes; - - static { - _lineSeparator = System.lineSeparator(); - _noConversionRequired = _lineSeparator.equals("\r\n"); - _lineSeparatorBytes = _lineSeparator.getBytes(StandardCharsets.US_ASCII); - } + + static final boolean _noConversionRequired = System.lineSeparator().equals("\r\n"); + static final byte[] _lineSeparatorBytes = System.lineSeparator().getBytes(StandardCharsets.US_ASCII); /** * Returns true if the NetASCII line separator differs from the system line separator, false if they are the same. This method is useful to determine
