mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -4,6 +4,7 @@ import org.dromara.hutool.core.reflect.FieldUtil;
|
||||
import org.dromara.hutool.core.reflect.ModifierUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledForJreRange;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -26,6 +27,15 @@ public class ModifierUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledForJreRange(max = org.junit.jupiter.api.condition.JRE.JAVA_8)
|
||||
void removeFinalModifyTest() {
|
||||
final String fieldName = "DIALECTS";
|
||||
final Field field = FieldUtil.getField(JdbcDialects.class, fieldName);
|
||||
ModifierUtil.removeFinalModify(field);
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledForJreRange(max = org.junit.jupiter.api.condition.JRE.JAVA_8)
|
||||
public void setFinalFieldValueTest() {
|
||||
final String fieldName = "DIALECTS";
|
||||
final List<Number> dialects =
|
||||
|
@@ -7,6 +7,7 @@ import org.dromara.hutool.core.regex.ReUtil;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledForJreRange;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -193,6 +194,7 @@ public class ReUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@EnabledForJreRange(max = org.junit.jupiter.api.condition.JRE.JAVA_8)
|
||||
public void getAllGroupNamesTest() {
|
||||
final String content = "2021-10-11";
|
||||
final String regex = "(?<year>\\d+)-(?<month>\\d+)-(?<day>\\d+)";
|
||||
|
Reference in New Issue
Block a user