update dependency

This commit is contained in:
Looly
2019-12-12 10:00:53 +08:00
parent 83d3170942
commit 6992ea9ee1
5 changed files with 13 additions and 12 deletions

View File

@@ -141,8 +141,8 @@ public class Base62Codec implements Serializable{
int remainder = 0;
for (int i = 0; i < source.length; i++) {
final int accumulator = (source[i] & 0xFF) + remainder * sourceBase;
for (byte b : source) {
final int accumulator = (b & 0xFF) + remainder * sourceBase;
final int digit = (accumulator - (accumulator % targetBase)) / targetBase;
remainder = accumulator % targetBase;

View File

@@ -35,14 +35,15 @@ public class HexUtil {
final int index = (value.startsWith("-") ? 1 : 0);
if (value.startsWith("0x", index) || value.startsWith("0X", index) || value.startsWith("#", index)) {
try {
//noinspection ResultOfMethodCallIgnored
Long.decode(value);
} catch (NumberFormatException e) {
return false;
}
return true;
} else {
return false;
}
return false;
}
// ---------------------------------------------------------------------------------------------------- encode