forked from plusone/plusone-commons
chore: 优化 JSR305 注解的使用
This commit is contained in:
@@ -36,6 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@Slf4j
|
||||
@SuppressWarnings("null")
|
||||
public class YearQuarterTests {
|
||||
|
||||
// ================================
|
||||
@@ -588,7 +589,7 @@ public class YearQuarterTests {
|
||||
Year.MIN_VALUE,
|
||||
Year.MAX_VALUE,
|
||||
})
|
||||
void of_ValidYearMonth_CreatesYearMnoth_Q1(int year) {
|
||||
void of_ValidYearMonth_CreatesYearMonth_Q1(int year) {
|
||||
{
|
||||
YearMonth yearMonth = YearMonth.of(year, 1);
|
||||
YearQuarter yearQuarter = YearQuarter.of(yearMonth);
|
||||
@@ -619,7 +620,7 @@ public class YearQuarterTests {
|
||||
Year.MIN_VALUE,
|
||||
Year.MAX_VALUE,
|
||||
})
|
||||
void of_ValidYearMonth_CreatesYearMnoth_Q2(int year) {
|
||||
void of_ValidYearMonth_CreatesYearMonth_Q2(int year) {
|
||||
{
|
||||
YearMonth yearMonth = YearMonth.of(year, 4);
|
||||
YearQuarter yearQuarter = YearQuarter.of(yearMonth);
|
||||
@@ -650,7 +651,7 @@ public class YearQuarterTests {
|
||||
Year.MIN_VALUE,
|
||||
Year.MAX_VALUE,
|
||||
})
|
||||
void of_ValidYearMonth_CreatesYearMnoth_Q3(int year) {
|
||||
void of_ValidYearMonth_CreatesYearMonth_Q3(int year) {
|
||||
{
|
||||
YearMonth yearMonth = YearMonth.of(year, 7);
|
||||
YearQuarter yearQuarter = YearQuarter.of(yearMonth);
|
||||
@@ -681,7 +682,7 @@ public class YearQuarterTests {
|
||||
Year.MIN_VALUE,
|
||||
Year.MAX_VALUE,
|
||||
})
|
||||
void of_ValidYearMonth_CreatesYearMnoth_Q4(int year) {
|
||||
void of_ValidYearMonth_CreatesYearMonth_Q4(int year) {
|
||||
{
|
||||
YearMonth yearMonth = YearMonth.of(year, 10);
|
||||
YearQuarter yearQuarter = YearQuarter.of(yearMonth);
|
||||
@@ -712,7 +713,7 @@ public class YearQuarterTests {
|
||||
Year.MIN_VALUE,
|
||||
Year.MAX_VALUE,
|
||||
})
|
||||
void of_NullYearMonth_CreatesYearMnoth_Q4(int year) {
|
||||
void of_NullYearMonth_CreatesYearMonth_Q4(int year) {
|
||||
YearMonth yearMonth = null;
|
||||
assertThrows(NullPointerException.class,
|
||||
() -> YearQuarter.of(yearMonth));
|
||||
|
@@ -27,6 +27,7 @@ import org.junit.jupiter.api.Test;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@SuppressWarnings("null")
|
||||
public class BigDecimalsTests {
|
||||
|
||||
@Test
|
||||
|
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings({"deprecation", "null"})
|
||||
public
|
||||
class EnumToolsTests {
|
||||
|
||||
|
@@ -35,6 +35,7 @@ import org.junit.jupiter.api.Test;
|
||||
/**
|
||||
* {@link OptionalTools} 单元测试
|
||||
*/
|
||||
@SuppressWarnings("null")
|
||||
public
|
||||
class OptionalToolsTests {
|
||||
|
||||
|
@@ -28,6 +28,7 @@ import org.junit.jupiter.api.Test;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@SuppressWarnings("null")
|
||||
public
|
||||
class RegexToolsTests {
|
||||
|
||||
|
@@ -28,6 +28,7 @@ import java.util.Arrays;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@SuppressWarnings("null")
|
||||
public
|
||||
class StringToolsTests {
|
||||
|
||||
|
@@ -39,6 +39,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@SuppressWarnings("null")
|
||||
class TreeBuilderTests {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(TreeBuilderTests.class);
|
||||
|
Reference in New Issue
Block a user