Skip to content

Commit cab71f8

Browse files
committed
Minor
1 parent 6e0fd5c commit cab71f8

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

Diff for: components/fetch-build-scan-data-cmdline-tool/src/main/java/com/gradle/enterprise/cli/ConsoleLogger.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.io.PrintStream;
66

77
public class ConsoleLogger {
8+
89
private final PrintStream out;
910
private final CommandLine.Help.ColorScheme colorScheme;
1011
private final boolean debugEnabled;
@@ -17,6 +18,10 @@ public ConsoleLogger(PrintStream out, CommandLine.Help.ColorScheme colorScheme,
1718
this.debugEnabled = debugEnabled;
1819
}
1920

21+
public void info(String message, Object... args) {
22+
info(String.format(message + "%n", args));
23+
}
24+
2025
public void info(String message) {
2126
out.println(message);
2227
lastStatementIncludedNewline = true;
@@ -27,10 +32,6 @@ public void infoNoNewline(String message) {
2732
lastStatementIncludedNewline = false;
2833
}
2934

30-
public void info(String message, Object... args) {
31-
info(String.format(message + "%n", args));
32-
}
33-
3435
public void debug(String message, Object... args) {
3536
debug(String.format(message, args));
3637
}
@@ -65,4 +66,5 @@ public void error(Throwable t) {
6566
public boolean isDebugEnabled() {
6667
return debugEnabled;
6768
}
69+
6870
}

Diff for: components/fetch-build-scan-data-cmdline-tool/src/main/java/com/gradle/enterprise/cli/FetchBuildValidationDataCommand.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static class ExitCode {
5454
@Option(names = {"--brief-logging"}, description = "Only log a short message about fetching build scan data and when it completes.")
5555
private boolean briefLogging;
5656

57-
private boolean someScansFailedToFetch = false;
57+
private boolean someScansFailedToFetch;
5858

5959
@Override
6060
public Integer call() throws Exception {

Diff for: components/fetch-build-scan-data-cmdline-tool/src/main/java/com/gradle/enterprise/model/CustomValueNames.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
import java.util.Properties;
88

99
public class CustomValueNames {
10+
1011
public static final CustomValueNames DEFAULT = new CustomValueNames(
11-
"Git repository", "Git branch", "Git commit id"
12+
"Git repository", "Git branch", "Git commit id"
1213
);
1314

1415
public static CustomValueNames loadFromFile(Path customValueMappingFile) throws IOException {
@@ -17,13 +18,14 @@ public static CustomValueNames loadFromFile(Path customValueMappingFile) throws
1718
Properties mappingProps = new Properties();
1819
mappingProps.load(in);
1920
return new CustomValueNames(
20-
mappingProps.getProperty("git.repository", DEFAULT.getGitRepositoryKey()),
21-
mappingProps.getProperty("git.branch", DEFAULT.getGitBranchKey()),
22-
mappingProps.getProperty("git.commitId", DEFAULT.getGitCommitIdKey())
21+
mappingProps.getProperty("git.repository", DEFAULT.getGitRepositoryKey()),
22+
mappingProps.getProperty("git.branch", DEFAULT.getGitBranchKey()),
23+
mappingProps.getProperty("git.commitId", DEFAULT.getGitCommitIdKey())
2324
);
2425
}
26+
} else {
27+
return CustomValueNames.DEFAULT;
2528
}
26-
return CustomValueNames.DEFAULT;
2729
}
2830

2931
private final String gitRepositoryKey;
@@ -47,4 +49,5 @@ public String getGitBranchKey() {
4749
public String getGitCommitIdKey() {
4850
return gitCommitIdKey;
4951
}
52+
5053
}

0 commit comments

Comments
 (0)