JCL-476: Adjust ProblemDetails API by acoburn · Pull Request #1393 · inrupt/solid-client-java
There are three significant changes to the ProblemsDetails API in this PR:
ProblemDetails::getDetailsbecomesProblemDetails::getDetail. This aligns the implementation with the RFC- The
ProblemDetails.DEFAULT_TYPEvalue is now aURI(instead of aString) SolidClientException::fromErrorResponsehas been refactored.- The autocloseable
InputStreamis now handled in a try-with-resources block to prevent resource leakage - The method accepts a response
URIso that any relativeURIs in theProblemDetailsbody can be resolved correctly - The method is made package-private, since it is not used outside of the package and I don't see a reason to make it part of the public API
- The logic has been reworked to remove duplication and simplify the flow considerably
- The autocloseable
In addition, the compiler arguments are changed from the old-style maven.compiler.source / maven.compiler.target to the new approach maven.compiler.release. This eliminates a troublesome compiler warning.