aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/Checksum.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 23:11:23 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 23:11:23 +1300
commit398b705820109c1103d915a2fec81fcf70b032cf (patch)
tree659a0483eda19f9c91855197b70fd2a0bfb82a60 /src/org/traccar/helper/Checksum.java
parent2da5669f8bd3f734fa37626c892aebdff7268613 (diff)
downloadtrackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.tar.gz
trackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.tar.bz2
trackermap-server-398b705820109c1103d915a2fec81fcf70b032cf.zip
Fix some check style issues
Diffstat (limited to 'src/org/traccar/helper/Checksum.java')
-rw-r--r--src/org/traccar/helper/Checksum.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/org/traccar/helper/Checksum.java b/src/org/traccar/helper/Checksum.java
index 6801e81d6..e6b6cd2c8 100644
--- a/src/org/traccar/helper/Checksum.java
+++ b/src/org/traccar/helper/Checksum.java
@@ -19,7 +19,10 @@ import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.zip.CRC32;
-public class Checksum {
+public final class Checksum {
+
+ private Checksum() {
+ }
private static final int[] CRC16_CCITT_TABLE_REVERSE = {
0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF,
@@ -132,8 +135,9 @@ public class Checksum {
return crc16Unreflected(buf, 0xFFFF, CRC16_CCITT_TABLE) ^ 0xFFFF;
case CRC16_MCRF4XX:
return crc16Reflected(buf, 0xFFFF, CRC16_CCITT_TABLE_REVERSE);
+ default:
+ throw new UnsupportedOperationException(type);
}
- throw new UnsupportedOperationException();
}
public static int crc32(ByteBuffer buf) {