mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update
This commit is contained in:
@@ -504,7 +504,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
if (hex.length() == 1) {
|
||||
hex = '0' + hex;
|
||||
}
|
||||
return "0x" + hex.toUpperCase();
|
||||
return Constants.HEX_PREFIX + hex.toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -548,9 +548,9 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
* @return byte
|
||||
*/
|
||||
public static byte uniteBytes(byte src0, byte src1) {
|
||||
byte _b0 = Byte.decode("0x" + new String(new byte[]{src0}));
|
||||
byte _b0 = Byte.decode(Constants.HEX_PREFIX + new String(new byte[]{src0}));
|
||||
_b0 = (byte) (_b0 << 4);
|
||||
byte _b1 = Byte.decode("0x" + new String(new byte[]{src1}));
|
||||
byte _b1 = Byte.decode(Constants.HEX_PREFIX + new String(new byte[]{src1}));
|
||||
byte ret = (byte) (_b0 ^ _b1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.common.util.id;
|
||||
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.exception.UtilException;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
@@ -133,7 +134,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID> {
|
||||
throw new IllegalArgumentException("Invalid UUID string: " + name);
|
||||
}
|
||||
for (int i = 0; i < 5; i++) {
|
||||
components[i] = "0x" + components[i];
|
||||
components[i] = Constants.HEX_PREFIX + components[i];
|
||||
}
|
||||
|
||||
long mostSigBits = Long.decode(components[0]).longValue();
|
||||
|
||||
Reference in New Issue
Block a user