mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-09-05 12:17:27 +00:00
fix[orm]: 修复FileChannelMap空指针异常
This commit is contained in:
@@ -66,13 +66,13 @@ public class FileChannelMap<V extends IPacket> implements LpMap<V>, Closeable {
|
||||
indexFileRandomAccess.writeLong(0L);
|
||||
}
|
||||
|
||||
maxIndex = readMaxIndex();
|
||||
|
||||
var protocolId = ProtocolAnalysis.getProtocolIdByClass(clazz);
|
||||
protocolRegistration = ProtocolManager.getProtocol(protocolId);
|
||||
|
||||
indexBuffer = ByteBufAllocator.DEFAULT.ioBuffer(16);
|
||||
dbBuffer = ByteBufAllocator.DEFAULT.ioBuffer(100);
|
||||
|
||||
maxIndex = readMaxIndex();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -120,6 +120,7 @@ public class FileChannelMap<V extends IPacket> implements LpMap<V>, Closeable {
|
||||
}
|
||||
|
||||
try {
|
||||
clearByteBuf();
|
||||
indexBuffer.writeBytes(indexFileChannel, key * 16L, 16);
|
||||
var packetPosition = indexBuffer.readLong();
|
||||
var packetSize = indexBuffer.readLong();
|
||||
|
||||
Reference in New Issue
Block a user