Source:
protected boolean discoverAddressSpace(final UUID streamId, final NavigableSet<Long> queue, final long startAddress, final long stopAddress, final Function<ILogData, Boolean> filter, final boolean checkpoint, final long maxGlobal) { if (Address.isAddress(startAddress) && (startAddress > stopAddress)) { StreamAddressSpace streamAddressSpace = getStreamAddressMap(startAddress, stopAddress, streamId); if (checkpoint) { processCheckpoint(streamAddressSpace, filter, queue); } else { queue.addAll(streamAddressSpace.copyAddressesToSet(maxGlobal)); long trimMark = streamAddressSpace.getTrimMark(); if (!checkpointCapableStream() && Address.isAddress(trimMark) && trimMark >= stopAddress) { String message = String.format("getStreamAddressMap[{%s}] stream has been " + "trimmed at address %s and we are trying to access the " + "stream starting at address %s.", this, trimMark, stopAddress); log.info(message); throw new TrimmedException(message); } if (checkpointCapableStream() && Address.isAddress(trimMark) && !isTrimCoveredByCheckpointOrLocalView(trimMark)) { String message = String.format("getStreamAddressMap[{%s}] stream has been " + "trimmed at address %s and this space is not covered by the " + "loaded checkpoint with start address %s, while accessing the " + "stream at version %s. Looking for a new checkpoint.",this, trimMark, getCurrentContext().checkpoint.startAddress, maxGlobal); log.info(message); if (options.ignoreTrimmed) { log.debug("getStreamAddressMap[{}]: Ignoring trimmed exception for address[{}].", this, streamAddressSpace.getTrimMark()); } else { throw new TrimmedException(message); } } } } addressCount += queue.size(); return !queue.isEmpty(); }

Target:
protected boolean discoverAddressSpace(final UUID streamId, final NavigableSet<Long> queue, final long startAddress, final long stopAddress, final Function<ILogData, Boolean> filter, final boolean checkpoint, final long maxGlobal) { if (Address.isAddress(startAddress) && (startAddress > stopAddress)) { StreamAddressSpace streamAddressSpace = getStreamAddressMap(startAddress, stopAddress, streamId); if (checkpoint) { processCheckpoint(streamAddressSpace, filter, queue); } else { queue.addAll(streamAddressSpace.copyAddressesToSet(maxGlobal)); long trimMark = streamAddressSpace.getTrimMark(); if (!isCheckpointCapable() && Address.isAddress(trimMark) && trimMark > stopAddress) { String message = String.format("getStreamAddressMap[{%s}] stream has been " + "trimmed at address %s and we are trying to access the " + "stream starting at address %s. This stream does not have " + "the checkpoint capability.", this, trimMark, stopAddress); log.info(message); throw new TrimmedException(message); } if (isCheckpointCapable() && Address.isAddress(trimMark) && !isTrimCoveredByCheckpointOrLocalView(trimMark)) { String message = String.format("getStreamAddressMap[{%s}] stream has been " + "trimmed at address %s and this space is not covered by the " + "loaded checkpoint with start address %s, while accessing the " + "stream at version %s. Looking for a new checkpoint.",this, trimMark, getCurrentContext().checkpoint.startAddress, maxGlobal); log.info(message); if (getReadOptions().isIgnoreTrim()) { log.debug("getStreamAddressMap[{}]: Ignoring trimmed exception for address[{}].", this, streamAddressSpace.getTrimMark()); } else { throw new TrimmedException(message); } } } } addressCount += queue.size(); return !queue.isEmpty(); }