mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
update dependency
This commit is contained in:
@@ -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;
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user