SshDaemon: Fix Checkstyle warnings

- Declare variables on separate lines
- Declare class modifiers in Java language spec recommended order
- Replace C-style array declarations with Java-style declarations

Change-Id: I12434301cb02db5c6b4548d18f7670543bf9e0f2
This commit is contained in:
David Pursehouse 2015-04-14 11:23:15 +09:00
parent 61c4316b2a
commit c7463ba0a4

@ -445,7 +445,8 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener {
if ((n & -n) == n) {
return (int)((n * (long) next(31)) >> 31);
}
int bits, val;
int bits;
int val;
do {
bits = next(31);
val = bits % n;
@ -455,9 +456,9 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener {
throw new IllegalArgumentException();
}
final protected int next(int numBits) {
protected final int next(int numBits) {
int bytes = (numBits+7)/8;
byte next[] = new byte[bytes];
byte[] next = new byte[bytes];
int ret = 0;
random.nextBytes(next);
for (int i = 0; i < bytes; i++) {