Thanks for your interest in contributing! This project is a small, focused collection of production-ready Java utilities, and it's also meant to be a friendly place to learn. Contributions of all sizes are welcome — bug fixes, new utilities, tests, and documentation.
- Report a bug – open an issue using the Bug report template.
- Request a utility/feature – open an issue using the Feature request template.
- Fix a "good first issue" – these are scoped to be approachable for newcomers.
- Improve docs or examples – README, Javadoc, and usage examples are always welcome.
Requirements: JDK 21+ and Maven 3.9+.
git clone https://github.com/rahilsh/java-toolkit.git
cd java-toolkit
mvn verify # compile, test, coverage gate, Spotless, Error Prone, SpotBugsUseful commands:
mvn test # run tests only
mvn spotless:apply # auto-format the code (run this before committing)
mvn -Psecurity verify # additionally run OWASP dependency-checkEvery build runs, and your PR must keep them green:
| Gate | What it enforces |
|---|---|
| JUnit 6 + JaCoCo | All tests pass; ≥ 85% line coverage on production code |
| Spotless (google-java-format) | Formatting & import order — run mvn spotless:apply |
| Error Prone + NullAway | Compile-time bug & nullability checks |
| SpotBugs (High) | Bytecode bug detection |
To keep the library consistent and dependency-light:
- Small and focused. One clear responsibility per class.
- Framework-agnostic & injectable. Take collaborators via the constructor; never hide global
mutable state. Pure helpers are
staticon afinalclass with a private constructor. - Fail loudly. Throw meaningful exceptions (
IOException/UncheckedIOExceptionwith context); never swallow errors or print stack traces. - UTF-8 everywhere. Never rely on the platform default charset.
- Mind the dependencies. Core utilities should avoid heavy dependencies. Anything that needs a
heavy library (PDF, Excel, HTTP, etc.) must declare that dependency as
<optional>true</optional>and be documented in the README "Feature dependencies" table. - Test it. Add JUnit 6 tests, including edge cases. Generate fixtures at runtime where possible (no committed binaries).
- Fork the repo and create a topic branch (
feat/...,fix/...,docs/...). - Make your change, add tests, and run
mvn spotless:apply && mvn verifylocally. - Update the README and
CHANGELOG.md(Unreleasedsection) if your change is user-facing. - Open a PR using the template and link any related issue.
- Keep PRs focused; unrelated changes should go in separate PRs.
Short, imperative summaries are appreciated (Conventional Commits style is welcome but not
required), e.g. fix(csv): support OpenCSV 5.x builder API.
By participating, you agree to abide by our Code of Conduct.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.