diff options
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org')
5 files changed, 22 insertions, 31 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java index f8442facb7..039d0946b2 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java @@ -136,18 +136,15 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { if (v != null) { item.setValue(new String(v)); return true; - } else { - return false; - } - } else { - String v = cons.readLine("%s: ", item.getPromptText()); //$NON-NLS-1$ - if (v != null) { - item.setValue(v); - return true; - } else { - return false; } + return false; + } + String v = cons.readLine("%s: ", item.getPromptText()); //$NON-NLS-1$ + if (v != null) { + item.setValue(v); + return true; } + return false; } private boolean get(CredentialItem.CharArrayType item) { @@ -156,18 +153,15 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { if (v != null) { item.setValueNoCopy(v); return true; - } else { - return false; - } - } else { - String v = cons.readLine("%s: ", item.getPromptText()); //$NON-NLS-1$ - if (v != null) { - item.setValueNoCopy(v.toCharArray()); - return true; - } else { - return false; } + return false; + } + String v = cons.readLine("%s: ", item.getPromptText()); //$NON-NLS-1$ + if (v != null) { + item.setValueNoCopy(v.toCharArray()); + return true; } + return false; } private boolean get(CredentialItem.InformationalMessage item) { @@ -182,8 +176,7 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { if (r != null) { item.setValue(CLIText.get().answerYes.equalsIgnoreCase(r)); return true; - } else { - return false; } + return false; } } 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 c3887fe9c3..23ee9337b6 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 @@ -306,8 +306,8 @@ class Status extends TextBuiltin { } outw.flush(); return list.size(); - } else - return 0; + } + return 0; } /** diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java index 8948c27537..0d30f3661c 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java @@ -189,9 +189,8 @@ class RebuildCommitGraph extends TextBuiltin { // rewritten. queue.add(t); continue REWRITE; - } else { - newParents[k] = p.newId; } + newParents[k] = p.newId; } else { // We have the old parent object. Use it. // diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index a2ea8c20b4..1242bb754b 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -138,9 +138,8 @@ class TextHashFunctions extends TextBuiltin { Arrays.fill(buf16, (byte) 0); System.arraycopy(raw, ptr, buf16, 0, end - ptr); return rabin(buf16, 0); - } else { - return rabin(raw, ptr); } + return rabin(raw, ptr); } private int rabin(byte[] raw, int ptr) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java index b97aa5b7af..d3aa38cf23 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java @@ -299,10 +299,10 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { /** {@inheritDoc} */ @Override protected OptionHandler createOptionHandler(OptionDef o, Setter setter) { - if (o instanceof NamedOptionDef) + if (o instanceof NamedOptionDef) { return super.createOptionHandler(o, setter); - else - return super.createOptionHandler(new MyOptionDef(o), setter); + } + return super.createOptionHandler(new MyOptionDef(o), setter); } |