将ObjUtil.defaultIfNull检验参数类型从Object改为泛型

This commit is contained in:
Looly
2022-08-30 21:38:57 +08:00
parent c555a0cbab
commit 1361e11592
2 changed files with 8 additions and 5 deletions

View File

@@ -82,7 +82,7 @@ public class ObjUtilTest {
public Obj clone() {
try {
return (Obj) super.clone();
} catch (CloneNotSupportedException e) {
} catch (final CloneNotSupportedException e) {
throw new CloneRuntimeException(e);
}
}
@@ -122,7 +122,7 @@ public class ObjUtilTest {
@Test
public void cloneIfPossibleTest() {
String a = "a";
final String a = "a";
final String a2 = ObjUtil.cloneIfPossible(a);
Assert.assertNotSame(a, a2);
}