ソースを参照

add startPrice endPrice

hr~ 1 ヶ月 前
コミット
5f563defc2

+ 11 - 12
lot/src/main/java/cn/hobbystocks/auc/common/utils/CloneUtils.java

@@ -13,18 +13,17 @@ public class CloneUtils {
 
 
      public static <T> T clone(T obj) {
-//         try {
-//             ByteArrayOutputStream bos = new ByteArrayOutputStream();
-//             ObjectOutputStream oos = new ObjectOutputStream(bos);
-//             oos.writeObject(obj);
-//             ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
-//             ObjectInputStream ois = new ObjectInputStream(bis);
-//             return (T) ois.readObject();
-//         }catch (Exception e) {
-//             log.error("clone error", e);
-//             return null;
-//         }
-         return ObjectUtil.clone(obj);
+         try {
+             ByteArrayOutputStream bos = new ByteArrayOutputStream();
+             ObjectOutputStream oos = new ObjectOutputStream(bos);
+             oos.writeObject(obj);
+             ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
+             ObjectInputStream ois = new ObjectInputStream(bis);
+             return (T) ois.readObject();
+         }catch (Exception e) {
+             log.error("clone error", e);
+             return null;
+         }
     }
 
 }