aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2023-09-16 22:09:11 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2023-09-22 23:31:27 +0200
commit4cf246c9ab66cd815e76fe20c32502e5e5bb66f1 (patch)
treebfeb4184ceaed2b91adb276b0bbac73e0d0cd511 /org.eclipse.jgit.pgm/src
parentd65170603f50db4bdafa9e926e56f0b2abab6f6e (diff)
downloadjgit-4cf246c9ab66cd815e76fe20c32502e5e5bb66f1.tar.gz
jgit-4cf246c9ab66cd815e76fe20c32502e5e5bb66f1.zip
[errorprone] Remove unnecessary parentheses
see https://errorprone.info/bugpattern/UnnecessaryParentheses Change-Id: Id08cf0e05b3d35f139fc34e0aa83882555a8a81a
Diffstat (limited to 'org.eclipse.jgit.pgm/src')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java3
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index d059eff5d7..8df9bad740 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -355,8 +355,7 @@ public class Main {
continue;
}
- final URL u = new URL(
- (!s.contains("://")) ? protocol + "://" + s : s); //$NON-NLS-1$ //$NON-NLS-2$
+ URL u = new URL(!s.contains("://") ? protocol + "://" + s : s); //$NON-NLS-1$ //$NON-NLS-2$
if (!u.getProtocol().startsWith("http")) //$NON-NLS-1$
throw new MalformedURLException(MessageFormat.format(
CLIText.get().invalidHttpProxyOnlyHttpSupported, s));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
index 1ef39a1a7d..c96e475613 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
@@ -226,7 +226,7 @@ class Status extends TextBuiltin {
firstHeader = false;
}
int nbUntracked = untracked.size();
- if (nbUntracked > 0 && ("all".equals(untrackedFilesMode))) { //$NON-NLS-1$
+ if (nbUntracked > 0 && "all".equals(untrackedFilesMode)) { //$NON-NLS-1$
if (!firstHeader)
printSectionHeader(""); //$NON-NLS-1$
printSectionHeader(CLIText.get().untrackedFiles);