Merge branch 'chinabugotech:v6-dev' into v6-dev

This commit is contained in:
elichow 2025-03-26 09:19:17 +08:00 committed by GitHub
commit c2f531eaf3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

View File

@ -24,7 +24,6 @@ import org.dromara.hutool.core.map.TableMap;
import java.io.Serializable;
import java.lang.annotation.*;
import java.lang.reflect.AnnotatedElement;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
@ -135,7 +134,10 @@ public class CombinationAnnotatedElement implements AnnotatedElement, Serializab
parseDeclared(declaredAnnotations);
final Annotation[] annotations = element.getAnnotations();
if (Arrays.equals(declaredAnnotations, annotations)) {
// if (Arrays.equals(declaredAnnotations, annotations)) {
// pr#1323 如果子类重写了父类的注解虽然两者数组内部元素一样的但是数组中的顺序可能不一样
// getAnnotations()的包含父类getDeclaredAnnotations()不包含父类他们两是一个包含关系只会存在后者的注解元素大于等于前者的情况
if (declaredAnnotations.length == annotations.length) {
this.annotationMap = this.declaredAnnotationMap;
} else {
this.annotationMap = new TableMap<>();

View File

@ -278,6 +278,8 @@ public class CharUtil implements CharPool {
|| c == '\u3164'
// Braille Pattern Blank
|| c == '\u2800'
// Zero Width Non-Joiner, ZWNJ
|| c == '\u200c'
// MONGOLIAN VOWEL SEPARATOR
|| c == '\u180e';
}

View File

@ -19,6 +19,8 @@ package org.dromara.hutool.core.text;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class CharUtilTest {
@Test
@ -56,7 +58,10 @@ public class CharUtilTest {
Assertions.assertTrue(CharUtil.isBlankChar(a3));
final char a4 = '\u0000';
Assertions.assertTrue(CharUtil.isBlankChar(a4));
assertTrue(CharUtil.isBlankChar(a4));
final char a6 = '\u200c';
assertTrue(CharUtil.isBlankChar(a6));
}
@Test