Minimal Java library implementing RFC 7807/9457 "Problem Details". Immutable Problem model, builder, and exception.
- Always run
./gradlew(default tasks:spotlessApply build) to format, compile, and test. - If Spotless fails, run
./gradlew spotlessApplyto auto-fix, then re-run./gradlew. - Java 17+ required for Gradle runtime; code compiles to Java 8 bytecode.
- Dependencies:
gradle/libs.versions.toml. Refresh with./gradlew --refresh-dependencies. - Always validate changes with a full
./gradlewrun before considering a task complete.
| Path | Contents |
|---|---|
src/main/java |
Production source |
src/test/java |
Tests (JUnit Jupiter + AssertJ) |
build.gradle.kts |
Build config & Spotless setup |
buildSrc |
Custom Gradle plugins/scripts |
- Do not use terminal commands (e.g.,
cat,find,ls) to read or list project files - use IDE/agent tools instead. - Run tests once, save output to
build/test-run.loginside the repo (> build/test-run.log 2>&1), then read from that file to extract errors. Never run the same test command multiple times, without changes in sources. Store test output in multiple files if you want to compare before/after changes (ex.build/test-run-{i}.log).
- No self-explaining comments - only add comments for non-obvious context.
- No wildcard imports.
- Follow existing code patterns and naming conventions.
- Let
spotlessApplyhandle all formatting - never format manually.
- Method naming:
givenThis_whenThat_thenWhat. - No
// given,// when,// thensection comments. - Cover both positive and negative cases.
- Use AssertJ for assertions.