import java.util.Map;
import java.util.Properties;
+import javax.annotation.Nullable;
+
import org.sonarsource.scanner.api.Utils;
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, "");
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) {