aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2016-11-09 09:33:28 +0100
committerDuarte Meneses <duarte.meneses@sonarsource.com>2016-11-09 09:33:28 +0100
commit32da3293ad76b0a734ad78ecb3668c490c790a51 (patch)
tree284fe9757fbab6118665dab8affc2b6fbe5a334e
parent23efd95df4f6817446eb0e298c381f6a816eefd8 (diff)
downloadsonar-scanner-cli-32da3293ad76b0a734ad78ecb3668c490c790a51.tar.gz
sonar-scanner-cli-32da3293ad76b0a734ad78ecb3668c490c790a51.zip
Fix quality issues
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Conf.java4
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Logs.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Conf.java b/src/main/java/org/sonarsource/scanner/cli/Conf.java
index c224204..3479108 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Conf.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Conf.java
@@ -31,6 +31,8 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
+import javax.annotation.Nullable;
+
import org.sonarsource.scanner.api.Utils;
class Conf {
@@ -206,7 +208,7 @@ class Conf {
return locatePropertiesFile(settingsFile, props, settingsKey);
}
- private static Path locatePropertiesFile(Path defaultPath, Properties props, String settingsKey) {
+ private static Path locatePropertiesFile(@Nullable Path defaultPath, Properties props, String settingsKey) {
Path settingsFile = defaultPath;
if (settingsFile == null || !Files.exists(settingsFile)) {
String settingsPath = props.getProperty(settingsKey, "");
diff --git a/src/main/java/org/sonarsource/scanner/cli/Logs.java b/src/main/java/org/sonarsource/scanner/cli/Logs.java
index a26a850..60d788d 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Logs.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Logs.java
@@ -65,9 +65,7 @@ public class Logs {
public void error(String message, Throwable t) {
print(stdErr, "ERROR: " + message);
- if (t != null) {
- t.printStackTrace(stdErr);
- }
+ t.printStackTrace(stdErr);
}
private void print(PrintStream stream, String msg) {