diff options
Diffstat (limited to 'lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java')
-rw-r--r-- | lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java index 9509a9929d..29ef23f9ff 100644 --- a/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java +++ b/lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFStreamInputPacketReader.java @@ -13,7 +13,6 @@ package org.eclipse.linuxtools.ctf.core.trace; import java.io.IOException; import java.nio.ByteBuffer; -import java.nio.MappedByteBuffer; import java.nio.channels.FileChannel.MapMode; import org.eclipse.jdt.annotation.NonNull; @@ -35,6 +34,7 @@ import org.eclipse.linuxtools.ctf.core.event.types.SimpleDatatypeDefinition; import org.eclipse.linuxtools.ctf.core.event.types.StructDeclaration; import org.eclipse.linuxtools.ctf.core.event.types.StructDefinition; import org.eclipse.linuxtools.ctf.core.event.types.VariantDefinition; +import org.eclipse.linuxtools.internal.ctf.core.SafeMappedByteBuffer; import org.eclipse.linuxtools.internal.ctf.core.event.EventDeclaration; import org.eclipse.linuxtools.internal.ctf.core.event.types.composite.EventHeaderDefinition; import org.eclipse.linuxtools.internal.ctf.core.trace.StreamInputPacketIndexEntry; @@ -221,7 +221,7 @@ public class CTFStreamInputPacketReader implements IDefinitionScope, AutoCloseab @NonNull private ByteBuffer getByteBufferAt(long position, long size) throws CTFReaderException, IOException { - MappedByteBuffer map = fStreamInputReader.getFc().map(MapMode.READ_ONLY, position, size); + ByteBuffer map = SafeMappedByteBuffer.map(fStreamInputReader.getFc(), MapMode.READ_ONLY, position, size); if (map == null) { throw new CTFReaderException("Failed to allocate mapped byte buffer"); //$NON-NLS-1$ } |