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::getDetails becomes ProblemDetails::getDetail. This aligns the implementation with the RFC
  • The ProblemDetails.DEFAULT_TYPE value is now a URI (instead of a String)
  • SolidClientException::fromErrorResponse has been refactored.
    • The autocloseable InputStream is now handled in a try-with-resources block to prevent resource leakage
    • The method accepts a response URI so that any relative URIs in the ProblemDetails body 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

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.