1
0
mirror of https://github.com/chillzhuang/blade-tool synced 2025-03-13 09:07:23 +08:00

代码优化

This commit is contained in:
卢春梦 2025-02-13 17:45:33 +08:00
parent 044b6f61dc
commit 37c2563326

@ -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<Class<?>, Schema<?>> schemaCache = new ConcurrentHashMap<>();
private static final Map<Class<?>, Schema<?>> schemaCache = new ConcurrentHashMap<>();
/**
* 序列化方法把指定对象序列化成字节数组