mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复isBase64判断不正确的问题
This commit is contained in:
@@ -352,6 +352,9 @@ public class Base64 {
|
|||||||
* @since 5.7.5
|
* @since 5.7.5
|
||||||
*/
|
*/
|
||||||
public static boolean isBase64(byte[] base64Bytes) {
|
public static boolean isBase64(byte[] base64Bytes) {
|
||||||
|
if (base64Bytes == null || base64Bytes.length < 3) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
boolean hasPadding = false;
|
boolean hasPadding = false;
|
||||||
for (byte base64Byte : base64Bytes) {
|
for (byte base64Byte : base64Bytes) {
|
||||||
if (hasPadding) {
|
if (hasPadding) {
|
||||||
|
Reference in New Issue
Block a user