commit | 1a303596d8aa08cf3135819eaf8451d1a2e004b6 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Wed Dec 22 13:36:14 2021 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Wed Dec 22 13:36:14 2021 +0100 |
tree | e5f49cde168f98ceff9198d3b384a65ec7bfc76d | |
parent | 6f58c1eb6b2e9cd26d519484a3299fd7a86392e3 [diff] |
Adapt to enabling error level for the UnnecessaryParentheses bug pattern Fix the current issues so that the build continues to work. Bug: Issue 15082 Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Iba2e0421eddcc655f77eb328e8aba6216e4f7cdf
diff --git a/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java b/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java index 2648d10..c21e31c 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java +++ b/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java
@@ -55,7 +55,7 @@ return new StringBuilder() .append(super.getCommand(scheme, project)) .append(" && (cd ") - .append(QuoteUtil.quote((projectName))) + .append(QuoteUtil.quote(projectName)) .append(" && ") .append(configCommand) .append(")")
diff --git a/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java b/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java index d229a68..8478654 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java +++ b/src/main/java/com/googlesource/gerrit/plugins/download/scheme/SshScheme.java
@@ -47,7 +47,7 @@ && (sshAddr.startsWith("*:") || "".equals(sshAddr)) && urlProvider != null) { try { - sshAddr = (new URL(urlProvider.get())).getHost() + sshAddr.substring(1); + sshAddr = new URL(urlProvider.get()).getHost() + sshAddr.substring(1); } catch (MalformedURLException e) { // ignore, then this scheme will be disabled }