aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/sonarsource/scanner
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2016-03-10 17:22:51 +0100
committerDuarte Meneses <duarte.meneses@sonarsource.com>2016-03-10 17:22:51 +0100
commita7643bd79d1ccde8dba0c2ded5cbb005bab5bbbd (patch)
tree089c184f03d51077a031008924137b9285822e25 /src/main/java/org/sonarsource/scanner
parent1affe1fe830e4e17e50fdf9d801ce4b499a3bdb0 (diff)
downloadsonar-scanner-cli-a7643bd79d1ccde8dba0c2ded5cbb005bab5bbbd.tar.gz
sonar-scanner-cli-a7643bd79d1ccde8dba0c2ded5cbb005bab5bbbd.zip
improve quality
Diffstat (limited to 'src/main/java/org/sonarsource/scanner')
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Cli.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Cli.java b/src/main/java/org/sonarsource/scanner/cli/Cli.java
index b660a86..f8f1fb8 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Cli.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Cli.java
@@ -62,7 +62,7 @@ class Cli {
props.putAll(System.getProperties());
for (int i = 0; i < args.length; i++) {
String arg = args[i];
- if (i == 0 && !arg.startsWith("-")) {
+ if (i == 0 && arg.charAt(0) != '-') {
props.setProperty(RunnerProperties.TASK, arg);
} else if ("-h".equals(arg) || "--help".equals(arg)) {
@@ -118,7 +118,8 @@ class Cli {
}
private static void appendPropertyTo(String arg, Properties props) {
- final String key, value;
+ final String key;
+ final String value;
int j = arg.indexOf('=');
if (j == -1) {
key = arg;