Thank you for your interest in contributing to streambuffer — a single-class Java library that bridges OutputStream and InputStream through a dynamic, unbounded FIFO queue.
Prerequisites: Java 8+ (tests require Java 17+), Maven 3.3.9+
# Compile
mvn compile
# Run all tests with coverage
mvn test
# Build the JAR
mvn package
# Install to your local Maven repository (skip GPG signing)
mvn install -Dgpg.skip=true
# Run a single test
mvn test -Dtest=StreamBufferTest#testSimpleRoundTrip
# Run mutation tests (PIT)
mvn org.pitest:pitest-maven:mutationCoveragePlease open a GitHub Issue at:
https://github.com/bernardladenthin/streambuffer/issues
Before opening a new issue, search existing issues to avoid duplicates. Include:
- A minimal reproducible example (Java code snippet + observed vs. expected behaviour)
- Java version and OS
- streambuffer version (or commit SHA if building from source)
Security vulnerabilities must not be reported via public Issues — see SECURITY.md.
- Fork the repository on GitHub.
- Create a feature branch from
main:git checkout -b feature/my-descriptive-name
- Make your changes with tests (see Test policy below).
- Run the full test suite locally before pushing:
mvn verify
- Push your branch to your fork and open a Pull Request against
bernardladenthin/streambuffer:main. - Address any review comments and push updates to the same branch.
- A maintainer will merge once the PR is approved and CI passes.
Keep PRs focused: one logical change per PR makes review faster.
- Java version: source and binary compatibility targets Java 8; tests may use Java 17 features.
- Encoding: UTF-8 (enforced by
project.build.sourceEncodinginpom.xml). - Javadoc: use HTML entities for operators and symbols — never bare Unicode in Javadoc comments. See
CLAUDE.mdfor the full entity table (<,>,≤, etc.). - Thread safety: all accesses to the internal
Dequemust remain guarded bybufferLock; state fields must remainvolatile. - Formatting: follow the style of existing source files (consistent indentation, brace placement, etc.). No external formatter is currently enforced by the build, so match the surrounding code.
Additional architectural and Javadoc guidance lives in CLAUDE.md.
Every new feature or behaviour change MUST include automated tests. Pull requests that add or change functionality without corresponding tests will be asked to add tests before merge. Bug fixes SHOULD include a regression test.
Tests live in src/test/java/net/ladenthin/streambuffer/ and use JUnit 5 (Jupiter) with @Nested and @DisplayName grouping. Parameterised tests use @ParameterizedTest + @EnumSource(WriteMethod.class) to exercise the three write strategies (ByteArray, Int, ByteArrayWithParameter). New tests should follow the same pattern where applicable. The legacy JUnit 4 + DataProviderRunner stack has been removed.
Quality gates enforced by the build:
- PIT mutation testing — 100% mutation coverage threshold (
mvn org.pitest:pitest-maven:mutationCoverage). - JaCoCo — line and branch coverage reported on every
mvn test/mvn verifyrun. - CodeQL —
security-and-qualityquery suite runs in CI. - JMH benchmark —
StreamBufferThroughputBenchmarkexists for throughput experiments but is not part ofmvn verify; it is run on demand.
Commits follow the Conventional Commits specification. Use one of the standard types:
feat:— a new featurefix:— a bug fixdocs:— documentation onlytest:— adding or correcting testsrefactor:— code change that neither fixes a bug nor adds a featurechore:— build, tooling, or housekeepingci:— CI/CD configuration changes
Example: fix: prevent over-read on closed stream in read(byte[], int, int).
- GitHub Issues: https://github.com/bernardladenthin/streambuffer/issues — bug reports, feature requests, and general questions.
- GitHub Security Advisories (private): https://github.com/bernardladenthin/streambuffer/security/advisories/new — vulnerability reports only. See
SECURITY.md. - GitHub Discussions: not enabled for this project. Please use Issues for all non-security communication.
This project adopts the Contributor Covenant 2.0. All contributors and maintainers are expected to abide by it. See CODE_OF_CONDUCT.md. Report incidents to bernard.ladenthin@gmail.com.
The Maven Central release procedure lives in docs/RELEASE.md. Only maintainers run releases.
By submitting a pull request you agree that your contributions will be licensed under the Apache License, Version 2.0 — the same license that covers this project. See LICENSE for the full text.