MINOR: Modified System.getProperty("line.separator") to java.lang.System.lineSeparator() (#15782)

Reviewers: Igor Soarez  <soarez@apple.com>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
TaiJuWu 2024-04-26 02:32:11 +08:00 committed by GitHub
parent 8013657f5d
commit ce9026f597
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -820,7 +820,7 @@ object ConfigCommand extends Logging {
.ofType(classOf[String]) .ofType(classOf[String])
private val entityDefault: OptionSpecBuilder = parser.accepts("entity-default", "Default entity name for clients/users/brokers/ips (applies to corresponding entity type in command line)") private val entityDefault: OptionSpecBuilder = parser.accepts("entity-default", "Default entity name for clients/users/brokers/ips (applies to corresponding entity type in command line)")
val nl: String = System.getProperty("line.separator") val nl: String = System.lineSeparator()
val addConfig: OptionSpec[String] = parser.accepts("add-config", "Key Value pairs of configs to add. Square brackets can be used to group values which contain commas: 'k1=v1,k2=[v1,v2,v2],k3=v3'. The following is a list of valid configurations: " + val addConfig: OptionSpec[String] = parser.accepts("add-config", "Key Value pairs of configs to add. Square brackets can be used to group values which contain commas: 'k1=v1,k2=[v1,v2,v2],k3=v3'. The following is a list of valid configurations: " +
"For entity-type '" + ConfigType.TOPIC + "': " + LogConfig.configNames.asScala.map("\t" + _).mkString(nl, nl, nl) + "For entity-type '" + ConfigType.TOPIC + "': " + LogConfig.configNames.asScala.map("\t" + _).mkString(nl, nl, nl) +
"For entity-type '" + ConfigType.BROKER + "': " + DynamicConfig.Broker.names.asScala.toSeq.sorted.map("\t" + _).mkString(nl, nl, nl) + "For entity-type '" + ConfigType.BROKER + "': " + DynamicConfig.Broker.names.asScala.toSeq.sorted.map("\t" + _).mkString(nl, nl, nl) +

View File

@ -773,7 +773,7 @@ public abstract class TopicCommand {
.withRequiredArg() .withRequiredArg()
.describedAs("topic-id") .describedAs("topic-id")
.ofType(String.class); .ofType(String.class);
nl = System.getProperty("line.separator"); nl = System.lineSeparator();
String logConfigNames = LogConfig.configNames().stream().map(config -> "\t" + config).collect(Collectors.joining(nl)); String logConfigNames = LogConfig.configNames().stream().map(config -> "\t" + config).collect(Collectors.joining(nl));
configOpt = parser.accepts("config", "A topic configuration override for the topic being created." + configOpt = parser.accepts("config", "A topic configuration override for the topic being created." +