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
       }