v1.3.3
·
102 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
- Maven:
<dependencies> <dependency> <groupId>io.github.problem4j</groupId> <artifactId>problem4j-core</artifactId> <version>1.3.3</version> </dependency> </dependencies>
- Gradle (Kotlin DSL):
dependencies { implementation("io.github.problem4j:problem4j-core:1.3.3") }
Fixed
- Pull back from the idea of returning JSON-alike strings in
toString()methods of this library's classes. While it was nice, sinceContent-Typeis namedapplication/problem+json, these strings were not 100% valid JSONs in all scenarios, and it could be tempting to use it as a response body somewhere. Instead of that,toStringmethods will now produce strings that are simple, useful for logging/debugging and JSON representations should be delegated tojackson-databindandproblem4j-jackson, or any other library that may be supported in the future. - Seal the contract between
toProblemBuildermethod overloading inAbstractProblemMapperby making one methodfinal. Any extensions this logic should be performed by overriding the second method as the first one must only delegate to it.@Override public final ProblemBuilder toProblemBuilder(Throwable t) { return toProblemBuilder(t, null); } @Override public ProblemBuilder toProblemBuilder(Throwable t, ProblemContext context) { // ...
- Re-use instance of default implementation of
ProblemMapperreturned byProblemMapper.create(), because it's thread-safe, stateless and immutable. - Make resolution of deprecated HTTP status codes in
ProblemStatuslazy, by delegating to nested class. - Apply minor improvements to JavaDocs.