From 75969aa5e617bb6d5a21106c2c3249fa6e50f574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=89=91=E5=99=A8=E8=BF=91?= Date: Fri, 2 Jul 2021 15:13:21 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"PrepareLoadStrategy.addSchema=20DWORD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BAInt32"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 56739ffc --- .../github/yezhihao/protostar/DataType.java | 20 +++++++++---------- .../protostar/PrepareLoadStrategy.java | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/io/github/yezhihao/protostar/DataType.java b/src/main/java/io/github/yezhihao/protostar/DataType.java index 98a1b33..7b0d667 100644 --- a/src/main/java/io/github/yezhihao/protostar/DataType.java +++ b/src/main/java/io/github/yezhihao/protostar/DataType.java @@ -7,25 +7,25 @@ package io.github.yezhihao.protostar; */ public enum DataType { - /** 无符号单字节整型(8位) */ + //无符号单字节整型(字节, 8位) BYTE(1), - /** 无符号双字节整型(16位) */ + //无符号双字节整型(字节,16位) WORD(2), - /** 无符号四字节整型(32位) */ + //无符号四字节整型(字节,32位) DWORD(4), - /** 无符号八字节整型(64位) */ + //无符号八字节整型(字节,64位) QWORD(8), - /** 字节数组 */ + //N字节,字节数组 BYTES(-1), - /** BCD8421码 */ + //N字节,BCD8421码 BCD8421(-1), - /** 字符串 */ + //字符串,若无数据置空 STRING(-1), - /** 对象 */ + //对象 OBJ(-1), - /** 列表 */ + //列表 LIST(-1), - /** 字典 */ + //字典 MAP(-1); public int length; diff --git a/src/main/java/io/github/yezhihao/protostar/PrepareLoadStrategy.java b/src/main/java/io/github/yezhihao/protostar/PrepareLoadStrategy.java index 3c96d86..a2c9010 100644 --- a/src/main/java/io/github/yezhihao/protostar/PrepareLoadStrategy.java +++ b/src/main/java/io/github/yezhihao/protostar/PrepareLoadStrategy.java @@ -42,7 +42,7 @@ public abstract class PrepareLoadStrategy extends IdStrategy { this.typeIdMapping.put(key, NumberSchema.Int16.INSTANCE); break; case DWORD: - this.typeIdMapping.put(key, NumberSchema.Int32.INSTANCE); + this.typeIdMapping.put(key, NumberSchema.Long32.INSTANCE); break; case QWORD: this.typeIdMapping.put(key, NumberSchema.Long64.INSTANCE);