mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
将ObjUtil.defaultIfNull检验参数类型从Object改为泛型
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user