From ba07fc549fdcfe6d30524daf17ad33832b0efc75 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 11 Mar 2014 09:18:47 +0000
Subject: [PATCH] EntryContainer.java: Matt said we can get rid of the KeyReverseComparator: "It is not used any more, but has been kept for backwards compatibility with OpenDS 2.2 (the comparator is persisted in the JE database)"
---
opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java | 38 ++++++++++++++++----------------------
1 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java
index 1d45482..4210c83 100755
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java
@@ -505,14 +505,10 @@
*/
public static final char[] readPassword() throws ClientException {
try {
- char[] password = System.console().readPassword();
- if (password != null) {
- return password;
- }
+ return System.console().readPassword();
} catch (IOError e) {
throw ClientException.adaptInputException(e);
}
- return null;
}
/**
@@ -533,9 +529,8 @@
final String s = reader.readLine();
if (s == null) {
throw ClientException.adaptInputException(new EOFException("End of input"));
- } else {
- return s;
}
+ return s;
} catch (final IOException e) {
throw ClientException.adaptInputException(e);
}
@@ -559,20 +554,20 @@
final String ninput = input.trim();
if (ninput.length() == 0) {
return defaultValue;
- } else {
- try {
- int i = Integer.parseInt(ninput);
- if (i < 1 || i > 65535) {
- throw new NumberFormatException();
- }
- return i;
- } catch (NumberFormatException e) {
- // Try again...
- app.println();
- app.println(ERR_BAD_PORT_NUMBER.get(ninput));
- app.println();
- return null;
+ }
+
+ try {
+ int i = Integer.parseInt(ninput);
+ if (i < 1 || i > 65535) {
+ throw new NumberFormatException();
}
+ return i;
+ } catch (NumberFormatException e) {
+ // Try again...
+ app.println();
+ app.println(ERR_BAD_PORT_NUMBER.get(ninput));
+ app.println();
+ return null;
}
}
@@ -658,9 +653,8 @@
private PrintStream getErrStream() {
if (isInteractive()) {
return out;
- } else {
- return err;
}
+ return err;
}
/**
--
Gitblit v1.10.0