Fixed several dozen bugs as detected by FindBugs

This commit is contained in:
Obique PSWG
2015-10-10 23:36:16 -05:00
parent c89486185e
commit 5315185e7d
28 changed files with 190 additions and 70 deletions
+4 -2
View File
@@ -27,6 +27,8 @@
***********************************************************************************/
package resources.common;
import java.nio.charset.StandardCharsets;
public class CRC {
private static final int CRC_TABLE[] = {
@@ -131,7 +133,7 @@ public class CRC {
};
public static int getCrc(String input) {
byte [] bytes = input.getBytes();
byte [] bytes = input.getBytes(StandardCharsets.UTF_8);
int crc = 0xffffffff;
for (int i = 0; i < bytes.length; ++i) {
@@ -141,7 +143,7 @@ public class CRC {
}
public static int memcrc(String input) {
byte [] bytes = input.getBytes();
byte [] bytes = input.getBytes(StandardCharsets.UTF_8);
int crc = 0xffffffff;
for (int i = 0; i < bytes.length; ++i) {