Skip to content

Commit eed3f6b

Browse files
Merge pull request #73 from SonarSource/feature/mc/SCANNERAPI-185
SCANNERAPI-185 - Removed SonarQube-only logs and rename to SonarScanner
2 parents c0c757f + 4c6c3ea commit eed3f6b

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

api/src/main/java/org/sonarsource/scanner/api/internal/IsolatedLauncherFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ IsolatedLauncher createLauncher(final JarDownloader jarDownloader, final Classlo
8282
return objProxy;
8383
} catch (Exception e) {
8484
// Catch all other exceptions, which relates to reflection
85-
throw new ScannerException("Unable to execute SonarQube", e);
85+
throw new ScannerException("Unable to execute SonarScanner analysis", e);
8686
}
8787
});
8888
}

api/src/main/java/org/sonarsource/scanner/api/internal/ServerConnection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.nio.file.Files;
2525
import java.nio.file.Path;
2626
import java.nio.file.StandardCopyOption;
27+
import java.util.Locale;
2728
import java.util.Map;
2829
import okhttp3.OkHttpClient;
2930
import okhttp3.Request;
@@ -116,7 +117,7 @@ private ResponseBody callUrl(String url) throws IOException {
116117
}
117118
return response.body();
118119
} catch (Exception e) {
119-
logger.error(format("SonarQube server [%s] can not be reached", baseUrlWithoutTrailingSlash));
120+
logger.error(format("%s server [%s] can not be reached", url.toLowerCase(Locale.ENGLISH).contains("sonarcloud") ? "SonarCloud" : "SonarQube", baseUrlWithoutTrailingSlash));
120121
throw e;
121122
}
122123
}

api/src/main/java/org/sonarsource/scanner/api/internal/SimulatedLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public synchronized Enumeration<Object> keys() {
6161
};
6262
props.putAll(p);
6363
try (OutputStream outputStream = Files.newOutputStream(Paths.get(filePath))) {
64-
props.store(outputStream, "# Generated by a SonarQube Scanner");
64+
props.store(outputStream, "# Generated by a SonarScanner");
6565
} catch (Exception e) {
6666
throw new IllegalStateException("Fail to export scanner properties", e);
6767
}

0 commit comments

Comments
 (0)