aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-09-02 17:23:16 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-09-02 17:23:16 +0200
commitabb2e152f99285512a4d5281562c69338cd23efd (patch)
treedabc9e9040a7279d9096e500d2f3c24ecb11d5f0 /sonar-application
parent00e0421d707e63ed043117ee6563a1395d76cdb6 (diff)
downloadsonarqube-abb2e152f99285512a4d5281562c69338cd23efd.tar.gz
sonarqube-abb2e152f99285512a4d5281562c69338cd23efd.zip
Fix some quality flaws
Diffstat (limited to 'sonar-application')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/StartServer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/StartServer.java b/sonar-application/src/main/java/org/sonar/application/StartServer.java
index 1614befcbdc..3e4b563c4e8 100644
--- a/sonar-application/src/main/java/org/sonar/application/StartServer.java
+++ b/sonar-application/src/main/java/org/sonar/application/StartServer.java
@@ -30,6 +30,7 @@ public final class StartServer {
private static final String DEFAULT_WEB_HOST = "0.0.0.0";
private static final int DEFAULT_WEB_PORT = 9000;
private static final String DEFAULT_WEB_CONTEXT = "/";
+ private static final String PROPERTIES_FILE_PATH = "/conf/sonar.properties";
private StartServer() {
}
@@ -64,12 +65,12 @@ public final class StartServer {
private static Properties getConfiguration() throws IOException {
Properties properties = new Properties();
- properties.load(StartServer.class.getResourceAsStream("/conf/sonar.properties"));
+ properties.load(StartServer.class.getResourceAsStream(PROPERTIES_FILE_PATH));
return properties;
}
private static void configureHome() throws URISyntaxException {
- File confFile = new File(StartServer.class.getResource("/conf/sonar.properties").toURI());
+ File confFile = new File(StartServer.class.getResource(PROPERTIES_FILE_PATH).toURI());
System.setProperty("SONAR_HOME" /* see constant org.sonar.server.platform.SonarHome.PROPERTY */,
confFile.getParentFile().getParentFile().getAbsolutePath());
}