diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ProtostuffUtil.java b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ProtostuffUtil.java index bd36b06..841c190 100644 --- a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ProtostuffUtil.java +++ b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ProtostuffUtil.java @@ -34,11 +34,11 @@ public class ProtostuffUtil { /** * 避免每次序列化都重新申请Buffer空间 */ - private static LinkedBuffer buffer = LinkedBuffer.allocate(LinkedBuffer.DEFAULT_BUFFER_SIZE); + private static final LinkedBuffer buffer = LinkedBuffer.allocate(LinkedBuffer.DEFAULT_BUFFER_SIZE); /** * 缓存Schema */ - private static Map, Schema> schemaCache = new ConcurrentHashMap<>(); + private static final Map, Schema> schemaCache = new ConcurrentHashMap<>(); /** * 序列化方法,把指定对象序列化成字节数组