1
0
Эх сурвалжийг харах

Merge remote-tracking branch 'origin/V_1.0.0_RC' into V_1.0.0_RC

AE86 2 жил өмнө
parent
commit
fed4eff793

+ 3 - 7
dbsyncer-connector/src/main/java/org/dbsyncer/connector/schema/BitValueMapper.java

@@ -23,20 +23,16 @@ public class BitValueMapper extends AbstractValueMapper<byte[]> {
         if (val instanceof Integer) {
             ByteBuffer buffer = ByteBuffer.allocate(4);
             buffer.putInt((Integer) val);
-            byte[] bytes = new byte[4];
-            buffer.get(bytes);
-            return bytes;
+            return buffer.array();
         }
         if (val instanceof Boolean) {
             Boolean b = (Boolean) val;
             ByteBuffer buffer = ByteBuffer.allocate(2);
             buffer.putShort((short) (b ? 1 : 0));
-            byte[] bytes = new byte[2];
-            buffer.get(bytes);
-            return bytes;
+            return buffer.array();
         }
 
         throw new ConnectorException(String.format("%s can not find type [%s], val [%s]", getClass().getSimpleName(), val.getClass(), val));
     }
-    
+
 }

+ 0 - 1
dbsyncer-web/src/main/resources/application.properties

@@ -1,4 +1,3 @@
-# see more: https://my.oschina.net/dbsyncer/blog/8652905
 # 服务IP
 server.ip=127.0.0.1
 # 访问端口