aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-main/src/main/java
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2023-01-06 17:11:40 +0100
committersonartech <sonartech@sonarsource.com>2023-01-10 20:03:01 +0000
commit8868a5ff310c74f44f2c94e46ba31065017f50b4 (patch)
tree510cd149dfc10810e2eadf311e0305eefe3cec9a /server/sonar-main/src/main/java
parent18f91c25d369917f3a99841f6bb31b94a02467fc (diff)
downloadsonarqube-8868a5ff310c74f44f2c94e46ba31065017f50b4.tar.gz
sonarqube-8868a5ff310c74f44f2c94e46ba31065017f50b4.zip
[NO-JIRA] Remove reported code smells about text blocks
Diffstat (limited to 'server/sonar-main/src/main/java')
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java12
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java10
2 files changed, 13 insertions, 9 deletions
diff --git a/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
index 89d289724a0..64b00823c73 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
@@ -30,11 +30,13 @@ import java.util.stream.Collectors;
import org.sonar.process.Props;
public class EsJvmOptions extends JvmOptions<EsJvmOptions> {
- private static final String ELASTICSEARCH_JVM_OPTIONS_HEADER = "# This file has been automatically generated by SonarQube during startup.\n" +
- "# Please use sonar.search.javaOpts and/or sonar.search.javaAdditionalOpts in sonar.properties to specify jvm options for Elasticsearch\n" +
- "\n" +
- "# DO NOT EDIT THIS FILE\n" +
- "\n";
+ private static final String ELASTICSEARCH_JVM_OPTIONS_HEADER = """
+ # This file has been automatically generated by SonarQube during startup.
+ # Please use sonar.search.javaOpts and/or sonar.search.javaAdditionalOpts in sonar.properties to specify jvm options for Elasticsearch
+
+ # DO NOT EDIT THIS FILE
+
+ """;
public EsJvmOptions(Props props, File tmpDir) {
super(mandatoryOptions(tmpDir, props));
diff --git a/server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java b/server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java
index c18e78f3fcb..0b1535edbb4 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/es/EsYmlSettings.java
@@ -30,10 +30,12 @@ import org.yaml.snakeyaml.Yaml;
import static org.yaml.snakeyaml.DumperOptions.FlowStyle.BLOCK;
public class EsYmlSettings {
- private static final String ELASTICSEARCH_YML_OPTIONS_HEADER = "# This file has been automatically generated by SonarQube during startup.\n" +
- "\n" +
- "# DO NOT EDIT THIS FILE\n" +
- "\n";
+ private static final String ELASTICSEARCH_YML_OPTIONS_HEADER = """
+ # This file has been automatically generated by SonarQube during startup.
+
+ # DO NOT EDIT THIS FILE
+
+ """;
private final Map<String, String> elasticsearchSettings;