Skip to content

Experiments#819

Draft
garydgregory wants to merge 355 commits into
fix/read-onlyfrom
master
Draft

Experiments#819
garydgregory wants to merge 355 commits into
fix/read-onlyfrom
master

Conversation

@garydgregory

Copy link
Copy Markdown
Member

No description provided.

@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@garydgregory garydgregory marked this pull request as draft December 14, 2025 15:29
garydgregory and others added 28 commits December 24, 2025 08:23
- ~2.6x speedup on StringReader input
- ~10% speed on file resource as InputStreamReader

Benchmark
Mode  Cnt          Score         Error  Units
IOUtilsContentEqualsReadersBenchmark_2_22_0.testFileCurrent
avgt    5     105274.452 ±    1466.048  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testFileRelease2_22_0
avgt    5     107500.847 ±    1752.422  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testFile_2_21_0
avgt    5     115720.416 ±    1209.652  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testStringCurrent
avgt    5  113330719.330 ± 1187191.151  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testStringRelease2_22_0
avgt    5  110389392.582 ±  785367.455  ns/op
IOUtilsContentEqualsReadersBenchmark_2_22_0.testString_2_21_0
avgt    5  284939866.619 ± 9969793.485  ns/op

Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1)
Maven home: /opt/homebrew/Cellar/maven/3.9.12/libexec
Java version: 21.0.9, vendor: Homebrew, runtime:
/opt/homebrew/Cellar/openjdk@21/21.0.9/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "26.2", arch: "aarch64", family: "mac"
- Add missing comment.
- Close HTML tags.
- Typos
Bumps `commons.bytebuddy.version` from 1.18.2 to 1.18.3.

Updates `net.bytebuddy:byte-buddy` from 1.18.2 to 1.18.3
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](raphw/byte-buddy@byte-buddy-1.18.2...byte-buddy-1.18.3)

Updates `net.bytebuddy:byte-buddy-agent` from 1.18.2 to 1.18.3
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](raphw/byte-buddy@byte-buddy-1.18.2...byte-buddy-1.18.3)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-version: 1.18.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: net.bytebuddy:byte-buddy-agent
  dependency-version: 1.18.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add an empty line before a Javadoc comment
This reverts commit 4cf10f9.
garydgregory and others added 30 commits May 21, 2026 08:05
The buffer is now cleaned only on the first close() call.
* Add Buffers clear() methods

* BufferedFileChannelInputStream now clears its direct memory byte buffer
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.

FileChannels.contentEquals(ReadableByteChannel, ReadableByteChannel,
int) now clears its direct memory byte buffer on close.

BufferedFileChannelInputStream now clears its direct memory byte buffer
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.

FileChannels.contentEquals(ReadableByteChannel, ReadableByteChannel,
int) now clears its direct memory byte buffer on close.

BufferedFileChannelInputStream now clears its direct memory byte buffer
on close.

MemoryMappedFileInputStream now clears its direct memory byte buffer on
close.
Add tests for exact-match and non-consuming behavior.

Co-authored-by: Sarankumar Baskar <sbaskar@redhat.com>
Replace Java 26-ea with 27-ea for experimental builds
… by (#858)

default.

To get the old behavior back, call
org.apache.commons.io.output.DeferredFileOutputStream.Builder.setDeleteTempFileOnClose(false)

- Add DeferredFileOutputStream.Builder.setDeleteTempFileOnClose(boolean)
- Add PathUtils.clear[IfExists](Path)
- Add PathUtils.deleteIfExists(Path)
- Update generic type of RandomAccessFileMode.accept(Path, IOConsumer)
from IOConsumer<RandomAccessFile> to IOConsumer<IORandomAccessFile>
- Harden tests for NPEs on failures, happy path unchanged.
default (#858)

To get the old behavior back, call
org.apache.commons.io.output.DeferredFileOutputStream.Builder.setDeleteTempFileOnClose(false)

- Add DeferredFileOutputStream.Builder.setDeleteTempFileOnClose(boolean)
- Add PathUtils.clear[IfExists](Path)
- Add PathUtils.deleteIfExists(Path)
- Update generic type of RandomAccessFileMode.accept(Path, IOConsumer)
from IOConsumer<RandomAccessFile> to IOConsumer<IORandomAccessFile>
- Harden tests for NPEs on failures, happy path unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants