From daae8320a4d04ca4ed6d36ecb7e35db6800c29a2 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Thu, 3 Apr 2014 17:00:03 +0200 Subject: [PATCH] SONARPLUGINS-3329 Display "SONAR_RUNNER_OPTS" in the console if it is set --- .../java/org/sonar/runner/SystemInfo.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/sonar-runner-dist/src/main/java/org/sonar/runner/SystemInfo.java b/sonar-runner-dist/src/main/java/org/sonar/runner/SystemInfo.java index dff7f17..a35c29b 100644 --- a/sonar-runner-dist/src/main/java/org/sonar/runner/SystemInfo.java +++ b/sonar-runner-dist/src/main/java/org/sonar/runner/SystemInfo.java @@ -31,15 +31,19 @@ class SystemInfo { System.out.println("SonarQube Runner " + RunnerVersion.version()); System.out.println(java()); System.out.println(os()); + String runnerOpts = System.getenv("SONAR_RUNNER_OPTS"); + if (runnerOpts != null) { + System.out.println("SONAR_RUNNER_OPTS=" + runnerOpts); + } } static String java() { StringBuilder sb = new StringBuilder(); sb - .append("Java ") - .append(System.getProperty("java.version")) - .append(" ") - .append(System.getProperty("java.vendor")); + .append("Java ") + .append(System.getProperty("java.version")) + .append(" ") + .append(System.getProperty("java.vendor")); String bits = System.getProperty("sun.arch.data.model"); if ("32".equals(bits) || "64".equals(bits)) { sb.append(" (").append(bits).append("-bit)"); @@ -50,11 +54,11 @@ class SystemInfo { static String os() { StringBuilder sb = new StringBuilder(); sb - .append(System.getProperty("os.name")) - .append(" ") - .append(System.getProperty("os.version")) - .append(" ") - .append(System.getProperty("os.arch")); + .append(System.getProperty("os.name")) + .append(" ") + .append(System.getProperty("os.version")) + .append(" ") + .append(System.getProperty("os.arch")); return sb.toString(); } } -- 2.39.5