You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static final object clone(Object o){
if (o =null)
return o;
try{
final Class<?>kls = o.getclass();
if (kls.isArray())
return Arraysx.duplicate(o);
if (o instanceof Cloneable){
try{
return kls.getMethod("clone").invoke (o);
}catch (NoSuchMethodException ex)(
if (log.isDebugEnabled())log.debug("No clone()for "+kls);
}
}
//TODO:Marshalledobject is said with very bad performance,change it
//if exists other good deep clone method.
return new Marshalledobject<object>(o).get ();
}catch (Exception ex){
throw SystemException.Aide.wrap(ex);
}
}
test code:
@Test
public void test_clone_2_52()throws NoSuchFieldException,IllegalAccessException{
java.lang.Object object0=new com.kawa.familytree.main.bs.PersonalDAO();
org.zkoss.lang.Objects.clone(object0);
}
test results:
org.zkoss.lang.SystemException:java.io.NotSerializableException:com.kawa.sys.pub.DataAccessObjectat java.base/jdk.internal.reflect.NativeConstructorAccessorlmpl.newlnstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorlmpl.newlnstance(NativeConstructorAccessorlmpl.javaat java.base/jdk.internal.reflect.DelegatingConstructorAccessorlmpl.newlnstance(DelegatingConstructorAccessorat java.base/java.lang.reflect.Constructor.newlnstanceWithCaller(Constructor.java:499)at java.base/java.lang.reflect.Constructor.newlnstance(Constructor.java:480)
Sat org.zkoss.lang.Classes.newlnstance(Classes.java:76)
at org.zkoss.lang.Exceptions.wrap(Exceptions.java:163)
at org.zkoss.lang.SystemException$Aide.wrap(SystemException.java:43)at org.zkoss.lang.Objects.clone(Objects.java:441)
The text was updated successfully, but these errors were encountered:
The file path is org.zkoss.lang.Object.
source code:
test code:
test results:
The text was updated successfully, but these errors were encountered: