Enable PMD rule UnnecessaryModifier and fix violations
This commit is contained in:
parent
b68f1587b2
commit
5f942cc458
6 changed files with 19 additions and 20 deletions
|
|
@ -37,7 +37,7 @@ public final class MixCoderDataInputStream extends DataInputStream {
|
|||
return lastValue;
|
||||
}
|
||||
|
||||
public final boolean decodeBit() throws IOException {
|
||||
public boolean decodeBit() throws IOException {
|
||||
fillBuffer();
|
||||
boolean value = ((b & 1) != 0);
|
||||
b >>>= 1;
|
||||
|
|
@ -45,7 +45,7 @@ public final class MixCoderDataInputStream extends DataInputStream {
|
|||
return value;
|
||||
}
|
||||
|
||||
public final int decodeVarBits2() throws IOException {
|
||||
public int decodeVarBits2() throws IOException {
|
||||
int range = 0;
|
||||
while (!decodeBit()) {
|
||||
range = 2 * range + 1;
|
||||
|
|
@ -58,7 +58,7 @@ public final class MixCoderDataInputStream extends DataInputStream {
|
|||
*
|
||||
* @see #encodeBounded
|
||||
*/
|
||||
public final int decodeBounded(int max) throws IOException {
|
||||
public int decodeBounded(int max) throws IOException {
|
||||
int value = 0;
|
||||
int im = 1; // integer mask
|
||||
while ((value | im) <= max) {
|
||||
|
|
@ -75,7 +75,7 @@ public final class MixCoderDataInputStream extends DataInputStream {
|
|||
* @see #encodeVarBits
|
||||
*/
|
||||
|
||||
public final int decodeVarBits() throws IOException {
|
||||
public int decodeVarBits() throws IOException {
|
||||
fillBuffer();
|
||||
int b12 = b & 0xfff;
|
||||
int len = vl_length[b12];
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public final class MixCoderDataOutputStream extends DataOutputStream {
|
|||
}
|
||||
}
|
||||
|
||||
public final void encodeBit(boolean value) throws IOException {
|
||||
public void encodeBit(boolean value) throws IOException {
|
||||
if (bm == 0x100) {
|
||||
writeByte((byte) b);
|
||||
bm = 1;
|
||||
|
|
@ -71,7 +71,7 @@ public final class MixCoderDataOutputStream extends DataOutputStream {
|
|||
bm <<= 1;
|
||||
}
|
||||
|
||||
public final void encodeVarBits(int value) throws IOException {
|
||||
public void encodeVarBits(int value) throws IOException {
|
||||
int range = 0;
|
||||
while (value > range) {
|
||||
encodeBit(false);
|
||||
|
|
@ -82,7 +82,7 @@ public final class MixCoderDataOutputStream extends DataOutputStream {
|
|||
encodeBounded(range, value);
|
||||
}
|
||||
|
||||
public final void encodeBounded(int max, int value) throws IOException {
|
||||
public void encodeBounded(int max, int value) throws IOException {
|
||||
int im = 1; // integer mask
|
||||
while (im <= max) {
|
||||
if (bm == 0x100) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package btools.util;
|
|||
|
||||
|
||||
public interface ProgressListener {
|
||||
public void updateProgress(String task, int progress);
|
||||
void updateProgress(String task, int progress);
|
||||
|
||||
public boolean isCanceled();
|
||||
boolean isCanceled();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue