mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-22 18:30:43 +00:00
ARTEMIS-5275 use line separator method instead of property
This commit is contained in:
parent
1a7da3a33e
commit
b49041ac7d
@ -202,7 +202,7 @@ public class InstallAbstract extends InputAbstract {
|
||||
|
||||
// and then writing out in the new target encoding.. Let's also replace \n with the values
|
||||
// that is correct for the current platform.
|
||||
String separator = unixTarget && IS_NIX ? "\n" : System.getProperty("line.separator");
|
||||
String separator = unixTarget && IS_NIX ? "\n" : System.lineSeparator();
|
||||
content = content.replaceAll("\\r?\\n", Matcher.quoteReplacement(separator));
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(content.getBytes(encoding));
|
||||
try (FileOutputStream fout = new FileOutputStream(target)) {
|
||||
|
@ -525,7 +525,7 @@ public final class XmlDataExporter extends DBOption {
|
||||
|
||||
private static final char INDENT_CHAR = ' ';
|
||||
|
||||
private static final String LINE_SEPARATOR = System.getProperty("line.separator");
|
||||
private static final String LINE_SEPARATOR = System.lineSeparator();
|
||||
|
||||
boolean wrap = true;
|
||||
|
||||
|
@ -203,7 +203,7 @@ public class SaslKrb5LDAPSecurityTest extends AbstractLdapTestUnit {
|
||||
(InetSocketAddress)kdcServer.getTransports()[0].getAcceptor().getLocalAddress();
|
||||
int port = addr.getPort();
|
||||
File krb5conf = new File(testDir, "krb5.conf").getAbsoluteFile();
|
||||
String krb5confBody = MessageFormat.format(sb.toString(), getRealm(), "localhost", Integer.toString(port), System.getProperty("line.separator"));
|
||||
String krb5confBody = MessageFormat.format(sb.toString(), getRealm(), "localhost", Integer.toString(port), System.lineSeparator());
|
||||
FileUtils.writeStringToFile(krb5conf, krb5confBody, StandardCharsets.UTF_8);
|
||||
System.setProperty("java.security.krb5.conf", krb5conf.getAbsolutePath());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user